Home > Software engineering >  Is it possible to set your git pull <remote_master> so that you can just write git pull in the
Is it possible to set your git pull <remote_master> so that you can just write git pull in the

Time:08-13

I am working on a git repository that has branches constantly being merged into it, and I would like to somehow sync

git pull <remote_master> 

So that in the future I just need to execute

git pull 

And it will execute git pull from this <remote_master> ; is this possible?

I am on a Linux machine if it makes any difference.

CodePudding user response:

Try with:

git switch <branch to sync>
git branch --set-upstream-to origin <branch to sync>

This sets the default remote branch for the current local branch, as perfectly explained in this answer.

  • Related