git rebase has found a.git/rebase-applydirectory and so presumes that you might be in the middle of a rebase. This would have happened if there was a conflict during a previous rebase and the rebase was not finished; i.e. you did not run one ofgit rebase --abort,git rebase --skiporgit rebase --continue(the last one after resolving the conflict).

Solution by Siddhartha Reddy