> You asked to pull from the remote '--prune'

天涯浪子 提交于 2020-01-03 03:31:09

问题


I'm getting this error when using one of my aliases bdone

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

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

I have nothing to commit nothing to commit, working directory clean


回答1:


You asked to pull from the remote '--prune', but did not specify a branch

That means the remote name was empty, and the next command-line parameter (here --prune) was interpreted (wrongly) as the remote name.

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, git pull --rebase --autostash does basically the same thing.

So, if you have git 2.9 or more, do:

git config --global pull.rebase true
git config --global rebase.autoStash true

Then you can replace git up by a simple classic git pull.



来源:https://stackoverflow.com/questions/40066545/you-asked-to-pull-from-the-remote-prune

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!