Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Is it possible to set your git pull <remote_master> so that you can just write git pull in the future and it pulls this <remote_master>?

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?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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

>Solution :

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.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading