GIT Configuration
GitHub uses your commit email address to associate commits with your account on GitHub. You can choose the email address that will be associated with the commits you push from the command line as well as web-based Git operations you make.
GIT global Email & Name
You can use the git config command to change the email address you associate with your Git commits. The new email address you set will be visible in any future commits you push to GitHub.com from the command line. Any commits you made prior to changing your commit email address are still associated with your previous email address.
- Windows
- macOS
- Linux/Unix
- Open Git Bash
- Set an email address in Git. You can use any email address.
Configuring Global Email Addressgit config --global user.email "YOUR_EMAIL"tip
Make sure to use the Primary Email Address associated with your GitHub account, to avoid unexpected hurdles.
- Confirm that you have set the correct email address in Git:
$ git config --global user.emailemail@example.com
- Set your name in Git.
Configuring Global Namegit config --global user.name "YOUR NAME"
- Confirm that you have set the correct name in Git:
$ git config --global user.nameYour Name
- Open Terminal
- Set an email address in Git. You can use any email address.
Configuring Global Email Addressgit config --global user.email "YOUR_EMAIL"tip
Make sure to use the Primary Email Address associated with your GitHub account, to avoid unexpected hurdles.
- Confirm that you have set the correct email address in Git:
$ git config --global user.emailemail@example.com
- Set your name in Git.
Configuring Global Namegit config --global user.name "YOUR NAME"
- Confirm that you have set the correct name in Git:
$ git config --global user.nameYour Name
- Open Terminal
- Set an email address in Git. You can use any email address.
Configuring Global Email Addressgit config --global user.email "YOUR_EMAIL"tip
Make sure to use the Primary Email Address associated with your GitHub account, to avoid unexpected hurdles.
- Confirm that you have set the correct email address in Git:
$ git config --global user.emailemail@example.com
- Set your name in Git.
Configuring Global Namegit config --global user.name "YOUR NAME"
- Confirm that you have set the correct name in Git:
$ git config --global user.nameYour Name
Repository specific Email & Name
GitHub uses the email address set in your local Git configuration to associate commits pushed from the command line with your account on GitHub.
You can change the email address associated with commits you make in a single repository. This will override your global Git configuration settings in this one repository, but will not affect any other repositories.
- Windows
- macOS
- Linux/Unix
- Open Git Bash
- Set an email address in Git. You can use any email address.
Configuring Email Addressgit config user.email "YOUR_EMAIL"tip
Make sure to use the Primary Email Address associated with your GitHub account, to avoid unexpected hurdles.
- Confirm that you have set the correct email address in Git:
$ git config user.emailemail@example.com
- Set your name in Git.
Configuring Namegit config user.name "YOUR NAME"
- Confirm that you have set the correct name in Git:
$ git config user.nameYour Name
- Open Terminal
- Set an email address in Git. You can use any email address.
Configuring Email Addressgit config user.email "YOUR_EMAIL"tip
Make sure to use the Primary Email Address associated with your GitHub account, to avoid unexpected hurdles.
- Confirm that you have set the correct email address in Git:
$ git config user.emailemail@example.com
- Set your name in Git.
Configuring Namegit config user.name "YOUR NAME"
- Confirm that you have set the correct name in Git:
$ git config user.nameYour Name
- Open Terminal
- Set an email address in Git. You can use any email address.
Configuring Email Addressgit config user.email "YOUR_EMAIL"tip
Make sure to use the Primary Email Address associated with your GitHub account, to avoid unexpected hurdles.
- Confirm that you have set the correct email address in Git:
$ git config user.emailemail@example.com
- Set your name in Git.
Configuring Namegit config user.name "YOUR NAME"
- Confirm that you have set the correct name in Git:
$ git config user.nameYour Name
CRLF & EOL Specific Configuration
Keep LF intact upon checkout and clone
git config --global core.autocrlf false
Enforce input checking (forces LF on commit)
git config --global core.eol lf