mlc521 / terminal-ide

Automatically exported from code.google.com/p/terminal-ide
0 stars 0 forks source link

Author missing from git commit #35

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi, I have tried setting the user information via

git config --global user.name "Name"
git config --global user.email "email@email.com"

and locally as well via

git config user.name "Name"
git config user.email "email@email.com"

But yet when I commit, it is still not reading those configurations. The author 
for the commit is still "default_git_username"

Original issue reported on code.google.com by duc...@gmail.com on 25 Feb 2012 at 5:20

GoogleCodeExporter commented 9 years ago
I've gotten around this with a script named 'gitc',

set -x
git commit --author 'My Name <me@gmail.com>' -m "$*"

Although this doesn't help 'git push', I'm less bothered by that.

Original comment by ayrn...@gmail.com on 4 Mar 2012 at 3:30

GoogleCodeExporter commented 9 years ago
I found a way that works perfectly for this; add these exports to your .bashrc 
file:

export GIT_AUTHOR_NAME="John Doe"
export GIT_AUTHOR_EMAIL="john@doe.com"

You can also use GIT_COMMITTER_NAME/EMAIL.  (Found this on 
http://cheat.errtheblog.com/s/git, under the "Environment Variables" section 
towards the bottom.)

I think this issue would still be worth looking into; it might be a more 
general problem than just the git author name and email, and it might show 
itself in other, more subtle/sinister ways.

(BTW - awesome program!  I've been wanting something like this for ages!)

Original comment by matthewc...@gmail.com on 8 Mar 2012 at 2:39

GoogleCodeExporter commented 9 years ago
Thanks. That seems to work well. Though I would still like to know why it is 
not reading from the configurations that is set. It reads it find when you use 
git config but doesn't seem to read it when you are committing.

Original comment by duc...@gmail.com on 17 Mar 2012 at 10:30

GoogleCodeExporter commented 9 years ago
I just had to deal with this problem. By specifying the --author option, and 
then my name (I did not include my email), it figured out who I was and 
recorded my email with the commit. Luck I noticed, cause I might have broken my 
47 day streak on github over it...

Original comment by andrew.g...@gmail.com on 29 Mar 2013 at 6:34

GoogleCodeExporter commented 9 years ago
#2 worked for me. Thanks!

I also found I had to deal with issue #21 
(https://code.google.com/p/terminal-ide/issues/detail?id=21) regarding the 
timezone not being set correctly in the commit log.

Original comment by goo...@mspacek.mm.st on 18 Jan 2014 at 10:20