Skip to content

Instantly share code, notes, and snippets.

@samukasmk
Last active March 30, 2020 22:25
Show Gist options
  • Select an option

  • Save samukasmk/506e472eed92dbe720f7 to your computer and use it in GitHub Desktop.

Select an option

Save samukasmk/506e472eed92dbe720f7 to your computer and use it in GitHub Desktop.
Example of my ~/.gitconfig file.
[user]
name = SamukaSMk
email = [email protected]
[core]
excludesfile = /home/samuel/.gitignore_global
editor = /usr/bin/vim
[color]
ui = true
diff = auto
branch = auto
status = auto
interactive = auto
[diff]
tool = meld
guitool = meld
[difftool]
prompt = true
[difftool "meld"]
cmd = meld "$LOCAL" "$REMOTE"
[merge]
tool = meld
[mergetool "meld"]
cmd = meld "$LOCAL" "$BASE" "$REMOTE" --output "$MERGED"
[push]
default = current
[alias]
a = add
au = add -u
i = init
bl = log -p -M --follow --stat --
st = status
ra = remote add
ca = clean -f -d
kl = clean -f -d
cl = clone --recursive
co = commit -m
cob = commit --allow-empty -m
br = branch -a
ft = fetch --all --tags
fe = fetch
fea = fetch --all --tags
fp = !git fetch --all --tags && git pull
#fpo = !echo "git fetch --all --tags" && git fetch --all --tags && git plo
fpo = !git fetch --all --tags && git plo
fpor = !git fetch --all --tags && git plor
df = diff HEAD
dft = difftool HEAD
dfl = diff --name-only
difflist = diff --name-only
diffall = diff --name-only
ps = push
pso = !echo "git push origin $(git rev-parse --abbrev-ref HEAD)" && echo -n "Are you sure ? type 'y' : " && read OPT && test "$OPT" = "y" && git push origin $(git rev-parse --abbrev-ref HEAD) || echo "push aborted"
psof = !echo "git push --force origin $(git rev-parse --abbrev-ref HEAD)" && echo -n "Are you sure ? type 'force' : " && read OPT && test "$OPT" = "force" && git push --force origin $(git rev-parse --abbrev-ref HEAD) || echo "push aborted"
pl = pull
plo = !echo "git pull origin $(git rev-parse --abbrev-ref HEAD)" && git pull origin $(git rev-parse --abbrev-ref HEAD)
plor = !echo "git pull --rebase origin $(git rev-parse --abbrev-ref HEAD)" && echo -n "Are you sure ? type 'rebase' : " && read OPT && test "$OPT" = "rebase" && git pull --rebase origin $(git rev-parse --abbrev-ref HEAD) || echo "pull --rebase aborted"
l = log
l1 = log -n1
ll = log --pretty=oneline --abbrev-commit
ch = checkout
chb = checkout -b
chm = checkout master
chd = checkout develop
re = reset --hard HEAD
rblc = rebase -i HEAD~2
sub = submodule foreach git
sup = submodule update
t = tag
tree = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %C(green)a:%an, %ar %C(blue)c:%cn, %cr%Creset'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment