Last active
March 13, 2025 20:27
-
-
Save alexkrolick/3e9104dd6439eca7666cf77976f4b3a5 to your computer and use it in GitHub Desktop.
Git aliases and tool config
This file contains hidden or 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] | |
last = log -1 HEAD | |
unstage = reset HEAD -- | |
undo = reset --soft HEAD^ | |
stash-all = stash save --include-untracked | |
ss = stash-all | |
a = add --patch | |
aa = add . | |
amend = commit --amend | |
c = commit | |
cm = commit -m | |
cnv = commit --no-verify -m | |
ca = commit -am | |
co = checkout | |
cb = checkout -b | |
b = checkout | |
bb = checkout -b | |
br = branch | |
bra = branch -a | |
brr = branch -r | |
f = fetch --prune | |
fo = fetch --prune origin | |
m = merge | |
ps = push | |
pl = pull | |
pr = pull --rebase | |
pf = push --force-with-lease | |
l = log | |
lp = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' | |
s = status | |
d = diff | |
g = grep -i | |
[branch] | |
sort = committerdate | |
[column] | |
ui = auto | |
[commit] | |
verbose = true | |
[diff] | |
indentHeuristic = true | |
algorithm = histogram | |
colorMoved = plain | |
renames = true | |
mnemonicPrefix = true | |
[difftool] | |
prompt = false | |
[difftool "vscode"] | |
cmd = code --wait --diff $LOCAL $REMOTE | |
[fetch] | |
prune = true | |
pruneTags = true | |
all = true | |
[grep] | |
patternType = perl | |
[help] | |
autocorrect = prompt | |
[init] | |
defaultBranch = main | |
[interactive] | |
[merge] | |
keepBackup = false | |
conflictstyle = zdiff3 | |
[mergetool "p4merge"] | |
cmd = /Applications/p4merge.app/Contents/Resources/launchp4merge "\"$PWD/$BASE\"" "\"$PWD/$LOCAL\"" "\"$PWD/$REMOTE\"" "\"$PWD/$MERGED\"" | |
keepTemporaries = false | |
trustExitCode = false | |
keepBackup = false | |
[pull] | |
rebase = true | |
[push] | |
default = simple | |
autoSetupRemote = true | |
followTags = true | |
# brew install bat | |
[pager] | |
show = bat | |
log = bat | |
diff = bat | |
[rebase] | |
autosquash = true | |
autostash = true | |
updateRefs = true | |
[tag] | |
sort = version:refname |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment