New implementation of getCurrentBranch() to use "git rev-parse --abbrev-ref HEAD"