Skip to content

Instantly share code, notes, and snippets.

@pvaviloff
Last active July 20, 2022 10:30
Show Gist options
  • Save pvaviloff/375fcb018c970ef96f3e9a368dec666d to your computer and use it in GitHub Desktop.
Save pvaviloff/375fcb018c970ef96f3e9a368dec666d to your computer and use it in GitHub Desktop.
[alias]
#checkout branches
main = "!git checkout main; git status"
master = "!git checkout master; git status"
stage = "!git checkout stage; git status"
test = "!git checkout test; git status"
ch = "!git checkout \"$@\"; git status"
#short codes
pp = "!git pull; git push"
mm = "!git merge master"
mb = "!git pull; git merge \"$@\""
br = "!git status; git branch"
st = "!git status"
abort = "!git merge --abort"
#my log and changed files
lg = log --pretty=format:"%C(yellow)%h\\ %C(red)%ad%Cred%d\\ %C(cyan)%s\\ %C(blue)[%cn]" --decorate --numstat --date=short --author=3xter
#log showing changed files
ll = log --pretty=format:"%C(yellow)%h\\ %C(red)%ad%Cred%d\\ %C(cyan)%s\\ %C(blue)[%cn]" --decorate --numstat --date=short
#short log
li = log --pretty=format:"%C(yellow)%h\\ %C(red)%ad%Cred%d\\ %C(cyan)%s\\ %C(blue)[%cn]" --decorate --date=short
#show branches and commits
hist = log --pretty=format:\"%C(magenta)%h %C(red)%ad | %C(cyan)%s%d %C(blue)[%an]\" --graph --date=short
#create branch and checkout
new = checkout -b
#drop branch
del = branch -D
# list aliases
la = "!git config -l | grep alias | cut -c 7-"
[color]
ui = true
[color "branch"]
current = cyan bold reverse
local = cyan bold
remote = red
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
header=cyan bold
added = green bold
changed = magenta bold
untracked = red bold
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment