默认情况下使git pull(rebase)仅从当前下游分支中提取 [英] Make git pull (rebase) by default pull only from current downstream branch

查看:366
本文介绍了默认情况下使git pull(rebase)仅从当前下游分支中提取的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的方法是拉-进行git pull时,默认情况下会重新设置:

现在,我想进行"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.

有没有办法使git pull总是变基并只拉当前分支?

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

推荐答案

考虑此答案提到:

如果您有branch.autosetuprebase = always,那么它还会添加:

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

rebase = true

您可以在执行git branch --set-upstream master origin/master之后配置分支的rebase属性:

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

git config branch.master.rebase false

这篇关于默认情况下使git pull(rebase)仅从当前下游分支中提取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆