Skip to content

Instantly share code, notes, and snippets.

@TechnoTone
Created July 24, 2024 10:17
Show Gist options
  • Save TechnoTone/cc12d9ca1bb7134933eed6894f3a2c45 to your computer and use it in GitHub Desktop.
Save TechnoTone/cc12d9ca1bb7134933eed6894f3a2c45 to your computer and use it in GitHub Desktop.
[alias]
st = status
s = status -s
f = !git fetch -a --no-tags && git status ;:
fp = !git fetch -a --no-tags && git pull
p = pull
ch = checkout
co = checkout
cm = checkout master
cb = checkout -b
d = diff -U0
diffall = diff HEAD -U0
staged = diff --staged -U0
a = add
stageall = add .
pick = add -p
unstage = reset -q HEAD --
discard = checkout --
undo = checkout --
undoall = checkout --force
fpush = push --force-with-lease
c = commit
ac = !git add . && git commit -am
amend = commit --amend
amendnoedit = commit --amend --no-edit
ditto = "!f() { CMSG=$(git log -1 --format=format:'%s'); git commit -m \"$CMSG\";}; f"
wip = ac "WIP..."
uncommit = reset --mixed HEAD~
rebasemaster = "!f() { CBRANCH=$(git rev-parse --abbrev-ref HEAD); git cm && git fp && git co \"$CBRANCH\" && git rebase master; }; f"
aliases = !git config --get-regexp ^alias\\. | sed -e s/^alias\\.// -e s/\\ /\\:\\ /
branches = branch -a
b = "!git for-each-ref --sort='-authordate' --format='%(authordate)%09%(objectname:short)%09%(refname)' refs/heads | sed -e 's-refs/heads/--'"
remotes = remote -v
stashes = stash list
tags = tag
g = log -10 --graph --branches --remotes --tags --format=format:'%Cgreen%h %Creset%<(75,trunc)%s (%C(Yellow)%cN%Creset, %Cblue%ar%Creset) %Cred%d' --date-order
graph = log -10 --graph --branches --remotes --tags --format=format:'%Cgreen%h %Creset%<(75,trunc)%s (%C(Yellow)%cN%Creset, %Cblue%ar%Creset) %Cred%d' --date-order
l = log -10 --format=format:'%Cgreen%h %Cblue%ar %Creset%s %C(Yellow)- %aN'
lg = log -10 --format=format:'%Cgreen%h %Cblue%ar %Creset%s %C(Yellow)- %aN'
search = log --format=format:'%Cgreen%h %Cblue%ar %Creset%s %C(Yellow)- %aN' -S
search-more = log --format=format:'%Cgreen%h %Cblue%ar %Creset%s %C(Yellow)- %aN' -p -S
regex = log --format=format:'%Cgreen%h %Cblue%ar %Creset%s %C(Yellow)- %aN' -G
regex-more = log --format=format:'%Cgreen%h %Cblue%ar %Creset%s %C(Yellow)- %aN' -p -G
whodunit = blame -wMC
sh = show -w -U0
ignore = update-index --assume-unchanged
unignore = update-index --no-assume-unchanged
ignored = !git ls-files -v | grep "^[[:lower:]]"
[push]
autoSetupRemote = true
[core]
pager = less -FXR
editor = code -nw
[init]
defaultBranch = main
[pull]
rebase = true
[rebase]
autoStash = true
[rerere]
enabled = true
[column]
ui = auto
[branch]
sort = --committerdate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment