Make add_file_to_git use a lock as we do for our other git repositories
This is in order to prevent breaking the git history when two requests
are touching the same git repo at the same time.
We had done most of these git calls but looks like we missed this one.
Fixes https://pagure.io/pagure/issue/2200