Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. 1. Clone the fork:
  2. `git clone <github url of the original repo>`
  3.  
  4. 2. Add remote from original repository in your forked repository:
  5. `cd into/cloned/fork-repo`
  6. `git remote add upstream <git url of the original repo>`
  7. `git fetch upstream`
  8.  
  9. 3. Updating your fork from original repo to keep up with their changes:
  10. `git pull upstream master`
  11.  
  12.  
  13. Another way
  14.  
  15. 1)`git fetch upstream`
  16. Check out the master branch from your local fork.
  17.  
  18. 2)`git checkout master`
  19. Now merge the changes from upstream/master into your local master branch.
  20. Your fork’s master branch will be in sync with the upstream repository. You will not lose your local changes.
  21.  
  22. 3)`git merge upstream/master`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement