Skip to content

Instantly share code, notes, and snippets.

@Darkside73
Last active January 9, 2020 15:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Darkside73/ee8a5e886282458d04abaff2324373a2 to your computer and use it in GitHub Desktop.
Save Darkside73/ee8a5e886282458d04abaff2324373a2 to your computer and use it in GitHub Desktop.
[user]
name = darkside
email = andrey.garbuz@gmail.com
[color]
diff = auto
status = auto
branch = auto
[color "branch"]
current = green
local = yellow
remote = magenta
[color "diff"]
meta = yellow
frag = magenta
old = red
new = green
[color "status"]
added = green
changed = yellow
untracked = cyan
[merge]
conflictstyle = diff3
[alias]
co = checkout
br = branch
a = add .
aa = add -A
ci = commit
cia = commit -a
ciaa = commit -a --amend --no-edit
ciamn = commit --amend --no-edit
st = status
m = merge --no-edit
mm = merge --no-edit --no-ff
unstage = reset HEAD --
new = checkout -b
ri = rebase -i
rc = rebase --continue
ra = rebase --abort
r = reset --soft
r1 = reset --soft HEAD~1
rh = reset --hard
rh1 = reset --hard HEAD~1
cp = cherry-pick
cpn = cherry-pick --no-commit
# cherry-pick given branch/commit and add "[HOT]" prefix to commit message
hotfix = "!f() { msg=`git log --format=%B -n 1 $1`; git cherry-pick --no-commit $1; git commit -m\"[HOT] ${msg}\"; }; f"
puf = push --force-with-lease
pullr = pull --rebase=preserve
df = diff
last = log -n
lg = log --graph --pretty=format:'%C(yellow)%h%Creset -%C(red)%d%Creset %s %C(bold blue)%an%Creset %Cgreen(%cr)' --abbrev-commit
diffi = diff --ignore-all-space
diffc = diff --cached
showi = show --ignore-all-space
# stage ALL changes and create "wip" commit
wip = !git add -A && git commit -m\"wip\"
# show recently pulled commits
pulled = !sh -c 'git log $1@{1}..$1@{0} "$@"'
[core]
editor = nano
excludesfile = ~/.gitignore
fileMode = false
autocrlf = false
[push]
default = current
[remote "origin"]
push = HEAD
[clean]
requireForce = false
[commit]
template = ~/.git-commit-template.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment