2

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...

enter image description here

1

2 Answers 2

2

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

  1. Specific to your user account i.e. ~/.gitconfig
    This setting will apply to any git project belonging to your user account

  2. On 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.

  3. 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 repo
  • git config user.name "John Doe"
  • git config user.email [email protected]
2

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .