[git] Make `credit` function work on Ubuntu