git fork the code to keep pace with the original code

1, first add remote source

git remote add remote_origin [email protected]:***/***.git

2, to obtain the original warehouse branch and the submission

git fetch remote_origin

4, updated with the latest commit-id git remote repo in all remote branches included, to record it to .git / FETCH_HEAD file

git fetch --all

5, to change the original remote_origin / master merge into your master branch. This will make your fork with the upper branch master warehouse remote_origin repository synchronization, without losing your local change made to:

git merge remote_origin/master
// or
git rebase remote_origin/master

6, submitted to the local code to github

git push
Published 41 original articles · won praise 21 · views 70000 +

Guess you like

Origin blog.csdn.net/u010324331/article/details/94560278