Forked from lamdor/Git remote fetching and not merging locally.txt
Created
July 20, 2009 22:24
-
-
Save atr000/150961 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To create a local branch that follows a remote branch (two ways): | |
First way (creates the branch that follows the remote branch "origin/master" and switches to it): | |
git checkout -b pull-watch origin/master | |
Second way (just creates the branch): | |
git branch pull-watch origin/master | |
Then after switching to the pull watch branch: | |
git pull | |
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. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment