>你要求从遥远的' - 普朗' [英] > You asked to pull from the remote '--prune'
问题描述
使用我的其中一个别名时出现此错误 bdone
您要求从远程'--prune'拉,但没有指定
分支。因为这不是您的
当前分支的默认远程配置,您必须在命令行中指定一个分支。
这是我使用的别名
alias.bclean!f(){git branch --merged $ {1-master} | grep -v $ {1-master} $ | xargs git branch -d; }; f
alias.bdone!f(){git checkout $ {1-master}&& git up&& git bclean $ {1-master}; }; f
我没有提交任何内容 code>
您要求从远程'
- prune
',但未指定分支
这意味着远程名称为空,并将下一个命令行参数(这里是 - prune
)解释为(错误地)作为远程名称。
这可能是 git-up.rb ,但是项目git up 不再被维护。它说:
从Git 2.9开始,
git pull --rebase --autostash
基本上是一样的。
所以,如果你有 然后您可以将 I'm getting this error when using one of my aliases You asked to pull from the remote '--prune', but did not specify a
branch. Because this is not the default configured remote for your
current branch, you must specify a branch on the command line. This is the alias I use I have nothing to commit You asked to pull from the remote ' That means the remote name was empty, and the next command-line parameter (here This may be a bug in git-up.rb, but the project git up is not maintained anymore. It says: As of Git 2.9, So, if you have git 2.9 or more, do: Then you can replace 这篇关于>你要求从遥远的' - 普朗'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
git config --global pull.rebase true
git config --global rebase.autoStash true
git up
由一个简单的经典 git pull
。bdone
alias.bclean !f() { git branch --merged ${1-master} | grep -v ${1-master}$ | xargs git branch -d; }; f
alias.bdone !f() { git checkout ${1-master} && git up && git bclean ${1-master}; }; f
nothing to commit, working directory clean
--prune
', but did not specify a branch--prune
) was interpreted (wrongly) as the remote name.
git pull --rebase --autostash
does basically the same thing.git config --global pull.rebase true
git config --global rebase.autoStash true
git up
by a simple classic git pull
.