I am wanting to bring a newly added remote branch into my local repository without interfering with my local branches. Is this possible?
When I do:
git branch -a
The new remote branch doesn't appear in the list. So if I try to fetch the origin/newremotebranch it says that it doesn't exist.
The following command will update your remote tracking branches:
git fetch origin
This will create new remote tracking branches in your local repository for any remote branches that don't yet have one.
You should be able to simply check out the remote branch:
git checkout -b new-branch-name origin/newremotebranch
Should start tracking, and you'll be able to fetch after that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With