user974802
user974802

Reputation: 3447

How to track the remote branch which already exists

I am using git (1.7 version) as my repository . One of my colleague as created a new branch named niuver_98 commited his changes and pushed this branch to github (remote).

I could able to checkout this branch using the following steps

git fetch 
git checkout niuver_98

This is all working fine .

But when i executed the command

git branch 

Why its not showing the branch niuver_98 ??

My question is that how can i track this branch niuver_98 ??

Please help , thank you very much .

Upvotes: 0

Views: 1164

Answers (1)

shanegao
shanegao

Reputation: 3592

git checkout -b niuver_98 
git pull

or

git checkout --track origin/niuver_98

Upvotes: 2

Related Questions