moved git functions up