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

2019-05-31 16:50发布

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

标签: git gitlab
1条回答
我欲成王,谁敢阻挡
2楼-- · 2019-05-31 17:49

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.

查看更多
登录 后发表回答