2016-12-12 7 views
1

たとえば、パーサーと呼ばれるgit repoがあるProductionと呼ばれています。 次に、ReParserブランチと呼ばれるレポがあります。git repoのブランチを変更履歴付きの別のブランチに置き換えてください

私は、Reparser /マスターパーサ/生産を置き換える両方のファイルと歴史をコミットする必要があります。これどうやってするの?

+1

ない[この前の質問](http://stackoverflow.com/questions/1683531/how-to-import-existing-git-repository-into-another)はあなたのために働くだろうか? – zoul

答えて

1

Parserにアクセスしてください。

$ git add remote reparser <reparser/repo/url> # add a new remote named reparser 
$ git fetch reparser       # sync with 'reparser' 

$ git checkout master      # checkout to master 
$ git branch -D Production     # delete existing local 'production' branch 
$ git checkout -b Production     # create and checkout 'new production' 

$ git pull reparser master     # replace parser/Production with reparser/master 
$ git push -f origin HEAD     # force push to remote Production of Parser 
関連する問題