I just recently installed gitg and whenever I tried to make a commit, I encountered an error of missing author details. However, I am unable to change author details
as no editing window pops up after I clicked on the the author details
tab...
-
1Hi. I have noticed the same problem. I think this is a bug. I reported it on GNOME Bugzilla : bugzilla.gnome.org/show_bug.cgi?id=760119– DesintegrCommented Jan 4, 2016 at 12:00
2 Answers
To get rid of the error you need to set your user name and email address.
There are two main contexts where you will likely want to set this
Specific to your user account i.e.
~/.gitconfig
This setting will apply to any git project belonging to your user accountOn a project specific basis i.e. in
<your_git_project>/.git/config
This setting will be used by that particular project - if for some reason you want a particular project to attach a different username and email address to your commits.You also can set config options at a system wide level - but I'm not going to cover that
to set an email address at a user level
git config --global user.name "John Doe"
git config --global user.email [email protected]
to set an email address at a project level.
cd
in to the root of the git repogit config user.name "John Doe"
git config user.email [email protected]
You can put the entry in config file of your repository. see the path like .git/config
- git config --global user.name "Display Name"
- git config --global user.email "[email protected]"
For more detail:
Type git config to see output like below:
--global use global config file
--system use system config file
--local use repository config file