2012-07-12 45 views
4

(衍合)默认情况下,拉我使用这样做的git拉的时候,我发现pull --rebase by default方法:制作的git拉仅从目前下游分支

现在我想让“git的拉” - 只默认拉当前分支:How do you get git to always pull from a specific branch?。然而,当git默认配置为重新绑定时,此答案不起作用。

有没有办法让git pull总是重新绑定并且只拉取当前分支?

+0

相关:[如何让Git为所有克隆默认使用rebase?](http://stackoverflow.com/q/13846300/456814)。 – 2014-05-23 19:03:22

回答

3

考虑this answer提到:

,如果你有branch.autosetuprebase = always那么它也将增加:

rebase = true 

你可以做git branch --set-upstream master origin/master后,配置分支的底垫属性:

git config branch.master.rebase false 
+0

啊,我没有看到。谢谢! – mbdev 2012-07-12 14:41:59

+0

我为什么要做“git config branch.master.rebase false”?那会在.git/config – mbdev 2012-07-12 17:07:15

+0

@mbdev中将rebase标志设置为false,以避免'git pull'后的默认git rebasing。 – VonC 2012-07-12 17:25:44