CARVIEW |
Setting user name, email and GitHub token
This guide covers basic git settings you should set before making any commits.
Please note that config changes will only affect future commits. Existing commits will retain the info they were committed with. Also, the environment variables GIT_COMMITTER_NAME
, GIT_COMMITTER_EMAIL
, GIT_AUTHOR_NAME
and GIT_AUTHOR_EMAIL
will override git-config settings if they are defined.
Setting user name and email globally in git
Git needs to know your username and email address to properly credit your commits. Setting this setting will also let GitHub link the commits you make to your GitHub account. Only commits made after you change this setting will use the new info, old commits will preserve the info they were committed with.
The “email” setting does not have to be a valid email address, it only need match the “user@server” naming scheme.
$ git config --global user.name "Tekkub" $ git config --global user.email "tekkub@gmail.com"
Overriding settings for individual repos
If you do not want commits to be “blamed” on your global email setting, you can override these settings on a per-repo basis.
$ cd my_other_repo $ git config user.name "Not Tekkub" $ git config user.email "not@tekkub.net"
GitHub token config
Some tools connect to GitHub without SSH, for these tools you need to set your local GitHub config. You can find your token at the top of the account page
$ git config --global github.user tekkub $ git config --global github.token 0123456789abcdef0123456789abcdef
If you change your GitHub password a new token will be created, therefore you’ll need to change this setting.
-
Setup
- Installing git (OSX)
- How to install git on OSX
- Generating SSH keys
- How to generate SSH keys and add them to GitHub
- Troubleshooting SSH issues
- Solutions to common SSH issues
- Setting user name, email and GitHub token
- Configure your local git installation so that commits are linked to your GitHub account
- Installing Git HTML help
- How to install the local git HTML help files
- Working with SSH key passphrases
- SSH key passphrases, why you should use them, and how to avoid re-entering them
-
Repos
- Deleting a repo
- How to remove a repo from your GitHub account
- Moving a repo
- How to move a repo from one account to another
-
Collaborating
- Forking a project
- How to fork a project, submit changes, and pull from other repos in the fork network
-
Mac
- Installing git (OSX)
- How to install git on OSX
- Generating SSH keys (OSX)
- Setting up SSH keys on Mac OSX
- Working with SSH key passphrases
- SSH key passphrases, why you should use them, and how to avoid re-entering them
-
Windows
- Generating SSH keys (Win/msysgit)
- Setting up SSH keys with msysgit on Windows
- Working with SSH key passphrases
- SSH key passphrases, why you should use them, and how to avoid re-entering them
-
Linux
- Generating SSH keys (Linux)
- Setting up SSH keys on Linux