finally got the git function