GIT practice: Merging local and remote warehouse warehouse
Scenario Description
We have to do is be a local warehouse and remote warehouse unrelated to merge.
The combined warehouse
1, the new remote repository address
Local repository, you first need to add a remote warehouse address :
git remote add origin https://gitee.com/mrsaber/leetcode.git
2, associated with the remote branch
Create a local development branch:
git checkout -b develop
Associated with the remote branch:
git branch --set-upstream-to=origin/develop develop
3, PULL remote repository Code
Because the two warehouses unrelated, so PULL when the need to increase the parameters - the allow-UNRELATED-Histories , otherwise it will error.
4, submitted to the local code and PUSH
Here is a routine operation, the entire business process is quite clear.
git add . git commit -m hello,world git push