Skip to content

Instantly share code, notes, and snippets.

@DanielKotik
Created January 2, 2018 15:17
Show Gist options
  • Save DanielKotik/a4f9300fa29de952565cee6f7072ff70 to your computer and use it in GitHub Desktop.
Save DanielKotik/a4f9300fa29de952565cee6f7072ff70 to your computer and use it in GitHub Desktop.
.gitconfig with useful aliases
[user]
name = ....
email = ....
[color]
ui = auto
diff = auto
status = auto
branch = auto
[push]
default = simple
[core]
autocrlf = input
filemode = false
editor = vim
[alias]
gr = log --graph --decorate --oneline # show pretty graph
soa = !git remote update && git status # state of affairs
# checkout Gitlab merge requests using `git mr <remote> <x>` (x is the MR number)
mr = !sh -c 'git fetch $1 merge-requests/$2/head:mr-$1-$2 && git checkout mr-$1-$2' -
[colors]
ui = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment