Anthony Anthony - 1 month ago 12
Git Question

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

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

Answer

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.