fix bad overwrite .gitconfig and remove redundant code