I have such a beautiful target in my Makefile which works in bash without a problem. git checkout - should checkout a previous branch, but it doesn't, it stays in that develop branch and that's it, while executing this in bash it works well. Do I have bad if statement maybe? In Makefile you need to you double dollar sign in order to have a bash subcommand right?
SHELL := /bin/bash rebase: git stash git checkout develop git pull --rebase origin develop if [ $$(git status --porcelain | wc -l) -lt 1 ]; then \ git checkout -;\ git rebase develop;\ git stash apply;\ fi;
git stash --include-untrackedgit config pull.rebase true; git config rebase.autoStash truecan be of interest here: no need for stashing: stackoverflow.com/a/30209750/6309