Skip to content

Instantly share code, notes, and snippets.

@laurentperroteau
Last active June 9, 2017 07:38
Show Gist options
  • Save laurentperroteau/0f835998dedb0a757ea0 to your computer and use it in GitHub Desktop.
Save laurentperroteau/0f835998dedb0a757ea0 to your computer and use it in GitHub Desktop.
Git config (avec alias)
[user]
name = myName
email = myEmail
[core]
autocrlf = true
editor = nano
[alias]
c = commit
b = branch -a
s = status -sb -uall
a = add
k = !git add . && git commit
di = "!f() { git diff --ignore-space-change $1; }; f"
f = fetch origin
undo = reset --soft HEAD^
crb = "!f() { git checkout -b $1 origin/$1; }; f"
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %Cblue<%an>%Creset' --abbrev-commit --date=relative --all
l = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %Cblue<%an>%Creset' --abbrev-commit --date=relative --all --max-count='10
[push]
default = simple
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment