git fetch -all
git Checkout <branch_name>
Note: the command is case sensitive.
git Checkout <branch_name>
Note: the command is case sensitive.
# list all remote branches
git branch -r
git fetch command. See Updating your remote-tracking branches with git fetch for more information.git fetch command, the remote branch is recreated. You can use the following command for that.# delete remote branch from origin
git branch -d -r origin/[remote_branch]
# delete branch in a remote repository
git push [remote] --delete [branch]
git pull and git push command directly without specifying the branch and repository.# setup a tracking branch called newbrach
# which tracks origin/newbranch
git checkout -b newbranch origin/newbranch
git checkout command you can also use the git branch command.# origin/master used as example, but can be replaced
# create branch based on remote branch
git branch [new_branch] origin/master
# use --track,
# default when the start point is a remote-tracking branch
git branch --track [new_branch] origin/master
--no-track allows you to specify that you do not want to track a branch. You can explicitly add a tracking branch with the git branch -u command later.# instruct Git to create a branch which does
# not track another branch
git branch --no-track [new_branch_notrack] origin/master
# update this branch to track the origin/master branch
git branch -u origin/master [new_branch_notrack]
# show all remote and tracking branches for origin
git remote show origin
* remote origin
Fetch URL: ssh://test@git.eclipse.org/gitroot/e4/org.eclipse.e4.tools.git
Push URL: ssh://test@git.eclipse.org/gitroot/e4/org.eclipse.e4.tools.git
HEAD branch: master
Remote branches:
integration tracked
interm_rc2 tracked
master tracked
smcela/HandlerAddonUpdates tracked
Local branches configured for 'git pull':
integration rebases onto remote integration
master rebases onto remote master
testing rebases onto remote master
Local refs configured for 'git push':
integration pushes to integration (up to date)
master pushes to master (up to date)
Hello Friends! I am Ramana a part time blogger from Hyderabad.