Refactors git prompt implementation