Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to pull from a different remote branch in git

Tags:

git

I am trying to pull from one of branch in remote named "front" to a branch named "back":

git checkout front
git pull

But i am getting error message like,

Please specify which branch you want to merge with.
See git-pull(1) for details.
git pull <remote> <branch>.

What should I do now? Thanks in advance..

like image 326
Jawakar Selvaraj Avatar asked Jan 13 '17 23:01

Jawakar Selvaraj


1 Answers

If I understand your scenario, you are working in a branch named "back", and you want to pull changes from the "front" branch.

If that is what you want to achieve, you may try the following command (while in the "back" branch):

git pull origin front
like image 126
Sam S Avatar answered Nov 16 '22 00:11

Sam S