Reputation: 81
So let's say someone made a remote branch called fooBranch
I looked through other posts and found
git fetch --all
git branch -a
and was able to see
remotes/origin/fooBranch
and I was able to check it out using
git checkout fooBranch
using this post How do I check out a remote Git branch? the problem is, I want to be able to track the branch and push changes to the branch.
I looked through tons of different posts to setup upstreams and tracking and they didn't work. such as this Make an existing Git branch track a remote branch? I use git 2.1.0, I already spent an hour trying to figure this out T_T, so any help would be appreciated.
Upvotes: 0
Views: 743
Reputation: 109
Find all remote branches:
git fetch
Create a local branch and track it (fetch/push)
git checkout -b fooBranch origin/fooBranch
Upvotes: 3