Initial Git setup - mpi-forum/mpi-issues GitHub Wiki
Previous: Overview of the MPI Forum's GitHub usage Next: Initial GitHub setup
Configuring Git (minimum)
At a minimum, you must configure Git to tell it your name and email address. Your name and email address will be associated with all commits that you make into the MPI Forum's repository.
Do this by running the following commands (substitute your actual name and email address as relevant):
$ git config --global user.name "YOUR NAME"
$ git config --global user.email "YOUR EMAIL ADDRESS"
On Linux, the above two commands will create or edit the $HOME/.gitconfig
file. It's a simple text file that can also be edited with your favorite text editor.
Configuring Git (recommended)
You can also place the following in your $HOME/.gitconfig
file. These are all optional, but several of us find them useful.
[color]
diff = auto
status = auto
branch = auto
ui = auto
# Helps to distinguish between changed and untracked files
[color "status"]
added = green
changed = red
untracked = magenta
# Allows git to create 8-character abbreviated hashes and
# highlight extra whitespace.
[core]
whitespace = trailing-space,space-before-tab,indent-with-tab
abbrev = 8
# Allows better view of commits.
[alias]
graph = log --graph --decorate --abbrev-commit --pretty=oneline
Previous: Overview of the MPI Forum's GitHub usage Next: Initial GitHub setup