This command is to make sure your local repository has the same knowledge of the remote-tracking branches as the server.git
git fetch <remote name>
If a new remote branch doesn't have a local branch mapped to it, you need to check out the remote branch locally to work on it. The complete command is,github
git checkout -b <local branch name> <remote name>/<remote branch name>
If you want to fetch all the branches on the serverapp
git branch -v -a
References:fetch
http://stackoverflow.com/questions/1783405/checkout-remote-git-branchcode
Push changes to remote. (If the remote doesn't have the branch, the branch will be created)server
git push <remote name> <branch name>
Renaming a branch (a complete version of push command)blog
This can delete a remote branch by providing empty local branch name.rem
git push <remote name> <local branch name>:<remote branch name>
References:get