Narrow Down Remote Git Branch Search | SJB -->

This website uses cookies to ensure you get the best experience. More info...


Narrow Down Remote Git Branch Search

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.

Git-Branch is Ahead of origin/master By n Commits
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.
Now fetch the branch that you want to track.
git fetch origin WTH_Bug_Experiment

No comments:

Post a Comment