rewriting the commit logic to be more git-like