I\'ve seen this command floating around on various sites.
git checkout --track -b <...>
If I create a bare repo on a remote server and wor
The command above will not work if you're not in a repository. To work with git, you must always first create a repository, either by cloning one which already exists or using git-init and starting from scratch.
git checkout --track -b
git checkout --track
These two commands create a new local branch to track . The first one manually names it ; the second uses the same name as the remote.
Remember that tracking doesn't mean automatic update - it simply does things like specifying where the branch should push/pull from and letting git status give those "your branch is behind origin/master by 5 commits, and can be fast-forwarded" messages.