Created
May 20, 2011 20:20
-
-
Save canton7/983719 to your computer and use it in GitHub Desktop.
Tracking in Git
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
Scenario | Tracking set up | |
----------------------------------------------------------------------------------|----------------- | |
Clone a (non-emtpy) repo, use the branch which is checked out automatically | Y | |
Push a branch to a remote, that doesn't exist on the remote | N | |
Push a branch to a remote, that doesn't exist on the remote, with push -u | Y | |
Checkout a branch from a remote, without -t (specified or implied) | N | |
Checkout a branch from a remote, with -t (specified or implied) | Y |
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
1. Clone an empty repo. | |
'git fetch' fetches objects: Y | |
'git pull' works: Y | |
'git push' works: N | |
2. git push origin master | |
'git fetch' fetches objects: Y | |
'git pull' works: Y | |
'git push' works: Y | |
3. git checkout -b new_branch | |
'git fetch' fetches objects: Y | |
'git pull' works: N | |
'git push' works: Y | |
4. git push origin new_branch | |
'git fetch' fetches objects: Y | |
'git pull' works: N | |
'git push' works: N | |
5. git push -u origin new_branch | |
'git fetch' fetches objects: Y | |
'git pull' works: Y | |
'git push' works: Y | |
6. git checkout -b another_branch | |
'git fetch' fetches objects: Y | |
'git pull' works: N | |
'git push' works: N | |
7. git push origin another_branch | |
'git fetch' fetches objects: Y | |
'git pull' works: N | |
'git push' works: Y | |
8. git branch --set-upstream another_branch origin/another_branch | |
'git fetch' fetches objects: Y | |
'git pull' works: Y | |
'git push' works: Y | |
9. git checkout master && | |
git branch -d new_branch && | |
git checkout -t origin/new_branch OR git checkout -b new_branch origin/new_branch | |
'git fetch' fetches objects: Y | |
'git pull' works: Y | |
'git push' works: Y | |
10. git checkout master && | |
git branch -d new_branch && | |
git checkout --no-track -b new_branch origin/new_branch | |
'git fetch' fetches objects: Y | |
'git pull' works: N | |
'git push' works: N |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment