Guest User

Untitled

a guest
Feb 19th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. To create a local branch that follows a remote branch (two ways):
  2.  
  3. First way (creates the branch that follows the remote branch "origin/master" and switches to it):
  4.  
  5. git checkout -b pull-watch origin/master
  6.  
  7. Second way (just creates the branch):
  8.  
  9. git branch pull-watch origin/master
  10.  
  11. Then after switching to the pull watch branch:
  12.  
  13. git pull
  14.  
  15. Another way to pull in changes without changing your local branches is just do a "git fetch". This will grab all of the changes in the remote repository, but not merge any into your local branches. Once you've looked over the changes using a "git log origin/master", you can then just do a "git merge origin/master" to apply the changes.
Add Comment
Please, Sign In to add comment