Skip to content

Instantly share code, notes, and snippets.

@skigun
Created June 6, 2022 22:41
Show Gist options
  • Save skigun/9f6d5301869d7cadeb8dfdbd015b735c to your computer and use it in GitHub Desktop.
Save skigun/9f6d5301869d7cadeb8dfdbd015b735c to your computer and use it in GitHub Desktop.
Alias git
[alias]
st = status
ci = commit -v
cim = commit -v -m "--"
co = checkout
br = branch -v
bra = branch -v -a
lg = log --graph --pretty=tformat:'%Cred%h%Creset -%C(cyan)%d %Creset%s %Cgreen(%an %cr)%Creset' --abbrev-commit --date=relative
lga = log --graph --pretty=tformat:'%Cred%h%Creset -%C(cyan)%d %Creset%s %Cgreen(%an %cr)%Creset' --abbrev-commit --date=relative --all
di = diff
sdi = diff --cached
logfull = log --pretty=fuller --graph --stat -p
cat = cat-file -p
unstage = reset HEAD
uncommit = update-ref HEAD HEAD^
uncommithard = reset --hard HEAD^
oups = commit --amend -C HEAD
tagg = ! git fetch origin -t && git tag -f -a -m 'created tag : `cat VERSION`' `cat VERSION` && git push origin --tags
tagc = ! TAG=`git describe --tags $(git rev-list --tags --max-count=1) | sed 's/v//' | awk -F . '{ printf "v%d.%d.%d", $1, $2, $3 + 1 }'` && echo $TAG > VERSION && git ci -m "Bumped to version : $TAG" VERSION && git tag -a -m "Created tag $TAG" $TAG && git push && git push --tags
rebc = rebase --continue
rebt = rebase --abort
rebs = rebase --skip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment