Changed Git.local_commits to be more robust