mbdev
mbdev

Reputation: 6583

Make git pull (rebase) by default pull only from current downstream branch

I am using the method I found to pull --rebase by default when doing git pull:

Now I want to make the 'git pull' - by default pull only the current branch: How do you get git to always pull from a specific branch?. However this answer does not work when git is configured to rebase by default.

Is there a way to make git pull always rebase and pull only current branch?

Upvotes: 4

Views: 3438

Answers (1)

VonC
VonC

Reputation: 1327784

Considering this answer mentions:

if you have branch.autosetuprebase = always then it will also add:

rebase = true

You can, after doing git branch --set-upstream master origin/master, configure the rebase attribute of your branch:

git config branch.master.rebase false

Upvotes: 4

Related Questions