When you are working on a large scale application code base, it is very likely that you will get too many remote branches with similar names.

You can easily narrow down the search by piping grep with the below command_
git
grep
{regexp}
To search branches that includes WTH_Bug, use the below command_
git
branch -r
|
grep
WTH_Bug
It will give you fewer options (with WTH_Bug) to pick from.
origin/WTH_Bug_WhoCares
origin/WTH_Bug_Experiment
origin/WTH_Bug_WTH
Now fetch the branch that you want to track.
git
fetch origin
WTH_Bug_Experiment
No comments:
Post a Comment