Posted over 7 years ago. Visible to the public.

Git configuration

Git can be configured in ~/.gitconfig. Here is an overview about common configurations:

Author name

To appear with your name in commits:

[user] name = Your Name email =


[color] ui = auto # The value for these configuration variables is a # list of colors (at most two) and attributes (at # most one), separated by spaces. # The colors accepted are: # normal, black, red, green, yellow, blue, magenta, cyan and white # The attributes are: # bold, dim, ul, blink and reverse # # The first color given is the foreground; the second # is the background. The position of the attribute, # if any, doesn’t matter. [color "branch"] current = yellow reverse local = yellow remote = green [color "diff"] whitespace = white reverse meta = blue reverse frag = blue reverse old = red new = green [color "status"] added = green changed = yellow untracked = cyan

Handy aliases

Please only use an alias if you understand what it does.

[alias] amend = commit -v --amend # Amend changes to last commit c = commit -v -m # Commit with message from command line, usage: git c "commit message" lc = show --name-status # Show last commit lou = log --oneline @{u}.. # List unpushed commits uncommit = reset HEAD~ --soft riu = rebase -i @{u} # Interactive rebase against upstream du = diff @{u} # Diff against upstream

"Upstream" is the branch on origin where your current local branch is pulling from and pushing to.

Growing Rails Applications in Practice
Check out our new e-book:
Learn to structure large Ruby on Rails codebases with the tools you already know and love.

Author of this card:

Martin Straub
Last edit:
6 days ago
by Henning Koch
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Martin Straub to makandra dev