Tool to clean up VM space
brew install docker-clean
docker-clean run
Alternatively, don't do that at all and run:
docker images | awk '{if(NR>1) print $3}' | xargs docker rmi -f
This is most common when using merge commits in the working branch and attempting to rebase that branch into a target branch. The solution is to either do a merge commit into the target branch, or to reqrite the history of the working copy as follows:
git checkout development
git pull
git checkout <feature branch>
git pull
git rev-list --count HEAD ^development // Provides the number of commits in the branch not in development