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.
Further to the comments below
When I try the solution proposed, I get the following error:
error: the requested upstream branch 'git@github.com:xxx/xxx.git' does not exist
hint:
hint: If you are planning on basing your work on an upstream
hint: branch that already exists at the remote, you may need to
hint: run "git fetch" to retrieve it.
hint:
hint: If you are planning to push out a new local branch that
hint: will track its remote counterpart, you may want to use
hint: "git push -u" to set the upstream config as you push.
Here is what my git branch
looks like:
(jobserveee) patrick@patrick-lp:~/work/jobserve$ git branch
ED-3312_adding_captureTimestamp_to_marketData_files
ED-3312_adding_capture_timestamp_to_quote_and_trade_tables_in_MD_files
ED-4785_Investigate_security_type_for_TSE_data_pre-2015
ED-4931_stop_updating_rawDataFile_statuses_after_pass1_has_run
ED-4931_stop_updating_rawDataFile_statuses_after_pass1_has_run3
* master
I am trying to sync the master
branch with a remote branch (I won't paste it here as I'm not sure I am allowed), but basically the way I get my remote branch URL is: in the remote repository I click code
-> SSH
and I copy the URL.
Then I execute
git branch --set-upstream-to <paste_the_URL_I_described_above>