Skip to content

Instantly share code, notes, and snippets.

@ignaces
Created August 10, 2022 05:34
Show Gist options
  • Select an option

  • Save ignaces/6bcfc06c231e95a42ae56c29afd90225 to your computer and use it in GitHub Desktop.

Select an option

Save ignaces/6bcfc06c231e95a42ae56c29afd90225 to your computer and use it in GitHub Desktop.
personal gitconfig
[user]
email = <redacted>
name = <redacted>
[alias]
hist = log --pretty=format:\"%Cgreen%h %Creset%cd %Cblue[%cn] %Creset%s%C(yellow)%d%C(reset)\" --graph --date=relative --decorate --all
[alias]
llog = log --graph --name-status --pretty=format:\"%C(red)%h %C(reset)(%cd) %C(green)%an %Creset%s %C(yellow)%d%Creset\" --date=relative
[alias]
df = "!git hist | peco | awk '{print $2}' | xargs -I {} git diff {}^ {}"
[alias]
ps = "!git push origin $(git rev-parse --abbrev-ref HEAD)"
[alias]
pst = "!git push origin $(git rev-parse --abbrev-ref HEAD) && git push origin --tags"
[alias]
pl = "!git pull origin $(git rev-parse --abbrev-ref HEAD)"
[alias]
f = "!git fetch origin"
[alias]
s = "!git status"
[alias]
r = "!git reset --hard"
[alias]
mirror = "!git push mirror --all && git push mirror --tags"
[alias]
main = "!git checkout main"
last = log -1 HEAD --stat
cm = commit -m
co = checkout
[init]
defaultBranch = main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment