Created
February 14, 2022 21:44
-
-
Save noinarisak/b55e7fc6ef716aa4d9d7bb33c91579d8 to your computer and use it in GitHub Desktop.
My .gitconfig alias
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
a = add | |
ap = add -p | |
amend-all = !git add -A && git commit --amend --no-edit | |
c = commit --verbose | |
ca = commit -a --verbose | |
cm = commit -m | |
co = checkout | |
cam = commit -a -m | |
br = !git branch -av | |
d = !git branch -D | |
db = "!git delete-branches" | |
dmb = "!git delete-merged-branches" | |
df = !git diff --name-only | |
m = commit --amend --verbose | |
f = "!git fetch --prune --verbose --tags --all" | |
l = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit | |
ls = log --graph --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate | |
ll = log --graph --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat | |
lp = !git l -p | |
st = status | |
tags = "!git tag --list" | |
up = !"git fetch --prune --verbose --tags --all -f && git checkout master && git pull --rebase" | |
up-main = !"git fetch --prune --verbose --tags --all -f && git checkout main && git pull --rebase" | |
upbr = "!git pull --rebase" | |
amend = commit --amend | |
branch-name = "!git rev-parse --abbrev-ref HEAD" | |
prune = "!git remote prune origin" | |
publish = "!git push -u origin $(git branch-name)" | |
push-tags = "!git push --tags" | |
push-skip = "!git push -o ci.skip" | |
unpublish = "!git push origin :$(git branch-name)" | |
unstage = reset HEAD | |
rebase-branch = "!git rebase -i `git merge-base master HEAD`" | |
resetorigin = "!git fetch origin && git reset --hard origin/master && git clean -f -d" | |
resetupstream = "!git fetch upstream && git reset --hard upstream/master && git clean -f -d" | |
gitignore-io-base = "!git ignore-io git vim python terraform visualstudiocode macos dotenv venv node" | |
untrack = "!git rm -r --cached . && git add . && echo 'Still go to commit!'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment