Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a central git repo located on a server. I have many contributors that are not tech savvy, do not have server access, and do not know anything about git. But they are able to contribute via the project's web side. Each of them logs on via a web browser and contributes to the project.

I have set things up so that when they log on, each user's contributions are made into a cloned repo on the server that is specifically for that user. Periodically, I log on to the server, visit each of their repos, and do a git diff to make sure they haven't done anything bad. If all is well, I commit their changes and push them to the central repo.

Of course I need to manually look at their changes so that I can add an appropriate commit message. But I would also like to track who made the changes. I am making the commit, and I (and the web server) are the only users that are actually writing anything to the server.

I could track this in the commit messages. While this strikes me as wrong, if this is my only option, is there a way to make userx's cloned repo always include "userx: " before each commit message that I add, so that I do not have to remind myself which user's repo I am in?

Or even better, is there an easy way for me to make the commit, but in such a way as I credit the user whose cloned repo I am in?

share|improve this question
up vote 10 down vote accepted

In git there are two names associated with a commit. An "author" and a "committer". In Your case you want to be the commiter and set the "author" accordingly using git commit's --author option.

$ git commit --author "John Doe <>" file1.dat file2.dat
$ git log --pretty=full
commit 46963e65f337fa08cfbebcd09ddf248474d49212
Author: John Doe <>
Commit: Johannes <>

     Sample commit

Alternatively if the workspace is specific to the user you could simple configure the username accordingly

$ git config --local --add "John Doe"
$ git config --local --add

then they are tracked as committer and author for all commits from that clone.

share|improve this answer
Thanks - that last option will make my chores easiest. – alex.jordan Aug 18 '14 at 4:53
Note also that if the author already exists (with their e-mail) in the commit database, a uniquely identifying substring such as --author=John will do. – Federico Poloni Aug 18 '14 at 8:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.