Git Config

Git can be configured by creating a .gitconfig file in your home directory. This is also where changes made with git config --global are saved.

Using this file you can make global changes that will be applied to each repo on your machine (unless overwritten in that repo).

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Pretty log format
[log]
    date = relative
[format]
    pretty = shortlog
[pretty]
    shortlog = format:%C(auto,yellow)%h%C(auto,magenta)% G? %C(auto,blue)%>(12,trunc)%ad %C(auto,green)%<(20,trunc)%aN%C(auto,reset)%s%C(auto,red)% gD
# Default git push behaviour
[push]
    default = current

default = current gives the following behaviour (git-config):

Push the current branch to update a branch with the same name on the receiving end. Works in both central and non-central workflows.