Creating a new commit
Before starting to develop with Git, you should introduce yourself with a name and an e-mail, as shown in Chapter 1, Git Basics in Practice. This information will be used to identify your work, either as an author or as a committer. The setup can be global for all your repositories (with git config --global
, or by editing the ~/.gitconfig
file directly), or local to a repository (with git config
, or by editing .git/config
). The per-repository configuration overrides the per-user one (you will learn more about it in Chapter 10, Customizing and Extending Git). You might want to use your company e-mail for work repositories, but your own non-work e-mail for public repositories you work on.
A relevant fragment of the appropriate config
file could look similar to this:
[user] name = Joe R. Hacker email = [email protected]