Reputation: 2821
I need to switch to a local brach master to a github branch feature/ABF-3-project-structure
I run the below command.
git pull feature/ABF-3-project-structure
Please help me out. I have tried for at least 3 hours but still no luck
Thanks, Enamul
Upvotes: 2
Views: 4665
Reputation: 2821
I have solved this problem by adding ssh key to github. I previously working on git with out setting ssh key on github.
It's very simple. I just added the ssh key and run the previous commands. That solves my problem. :)
Upvotes: 1
Reputation: 2555
Try this:
git pull {repo} {remotebranchname}:{localbranchname}
git pull origin abc:abc
In case when you are on the master branch you also should first checkout a branch:
git checkout -b abc
this should create new branch "abc" from the master and directly check it out. than you should run:
git pull origin abc
to pull the new branch to your local abc branch
Upvotes: 2
Reputation: 75
I'm not sure if I understand your question, but switching to the mentioned branch can be done with the following code: git checkout feature/ABF-3-project-structure
.
Upvotes: 3