pinch-dotfiles/salty/base/git/files/gitconfig

53 lines
1.4 KiB
Text
Raw Normal View History

2017-01-11 23:33:21 +00:00
[core]
editor = emacs
[user]
email = EliaElLazkani@Gmail.com
2017-01-11 22:40:11 +00:00
name = Elijah Lazkani
2017-01-11 23:33:21 +00:00
[push]
default = simple
[alias]
#Basics
s = status
cp = cherry-pick
st = status -s
cl = clone
ci = commit
co = checkout
cob = checkout -b
br = branch
diff = diff --word-diff
dc = diff --cached
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
lnc = log --pretty=format:"%h\\ %s\\ [%cn]"
lds = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short
# Relative Dates
ld = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative
le = log --oneline --decorate
# File log
fl = log -u
# Modified files in last commit
dl = "!git ll -1"
# Diff of last commit
dlc = diff --cached HEAD^
# Find name of file
f = "!git ls-files | grep -i"
# Find string in file
grep = grep -Ii
gr = grep -Ii
# Get all aliases
la = "!git config -l | grep alias | cut -c 7-"
# Last tag
lasttag = describe --tags --abbrev=0
lt = describe --tags --abbrev=0
# Get current branch name
cb = rev-parse --abbrev-ref HEAD
# Pull from upstream
upstream = "!f() { \
current_branch=$(git cb); \
git co master && git fetch upstream && git merge upstream/master; \
git co $current_branch; \
}; f"
[color]
ui = true