Is there a way to make a branch directly accessible after a git fetch without git checkout <newbranch>?
If I use the git fetch command I want to see the new branches directly in the list shown after I use e.g. git branch.
Is there a way to make a branch directly accessible after a git fetch without git checkout <newbranch>?
If I use the git fetch command I want to see the new branches directly in the list shown after I use e.g. git branch.
Copyright © 2021 Jogjafile Inc.
If by "accessible" you mean visible in the list given by
git branchthen you can use the-aflag:it will show all the branches including the remote tracking ones.
So if someone added
second_branchto the remote repository, before runninggit fetchyou might see:Then after the
git fetchyou might see:If you only want to see the remote tracking branches there's also the
-roption.