Last active
March 24, 2021 19:39
-
-
Save keif/269c4e9d000bef9ee2e8a81471d031e4 to your computer and use it in GitHub Desktop.
Most recent incarnation of .gitconfig 2021/03/24
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] | |
# log outputs | |
lds = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cgreen\\ [%cn]" --decorate --date=short | |
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cgreen\\ [%cn]" --decorate --numstat | |
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cgreen\\ [%cn]" --decorate | |
# fancy log output | |
log-fancy = log --graph --pretty=format:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(cyan)<%an>%Creset' --abbrev-commit --date=relative | |
log-me = !UN=$(git config user.name)&& git log --author="\"$UN\"" --pretty=format:'%h %cd %s' --date=short | |
log-nice = log --graph --decorate --pretty=oneline --abbrev-commit | |
# standup = log --since '1 day ago' --oneline --author <YOUREMAIL> # hack it with your email and uncomment | |
# jira = log --since '6am' --oneline --author <YOUREMAIL> # hack it with your email and uncomment | |
assume = update-index --assume-unchanged | |
unassume = update-index --no-assume-unchanged | |
assumed = "!git ls-files -v | grep ^h | cut -c 3-" | |
unassumeall = "!git assumed | xargs git update-index --no-assume-unchanged" | |
amend = commit --amend -aC HEAD | |
undo = reset --soft HEAD^ | |
# add all files | |
all = add --all | |
br = branch | |
co = checkout | |
# checkout new branch | |
cob = checkout -b | |
com = checkout master | |
cp = cherry-pick | |
ci = commit | |
# add new files with "commit message" | |
cm = !git add -A && git commit -m | |
cam = commit -am | |
# diff | |
dc = diff --cached | |
diff = diff --word-diff | |
wdiff = diff --word-diff=plain | |
st = status -s | |
# push to origin master | |
pom = push origin master | |
ready = rebase -i @{u} | |
ri5 = rebase -i HEAD~5 | |
ri9 = rebase -i HEAD~9 | |
# resets | |
r = reset | |
r1 = reset HEAD^ | |
r2 = reset HEAD^^ | |
rh = reset --hard | |
rh1 = reset HEAD^ --hard | |
rh2 = reset HEAD^^ --hard | |
# stash untracked changes | |
stuk = stash -u -k | |
stashf = stash show -p | git apply -3 && git stash drop | |
# git-svn | |
spull = svn rebase | |
spush = svn dcommit | |
# conflicts | |
conflicts = diff --name-only --diff-filter=U | |
[core] | |
autocrlf = input | |
excludesfile = /Users/<username>/.gitignore_global | |
editor = code | |
[difftool "sourcetree"] | |
cmd = opendiff \"$LOCAL\" \"$REMOTE\" | |
path = | |
[fetch] | |
prune = true | |
[filter "lfs"] | |
clean = git lfs clean %f | |
smudge = git lfs smudge %f | |
required = true | |
[mergetool "sourcetree"] | |
cmd = /Applications/Sourcetree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\" | |
trustExitCode = true | |
[pull] | |
rebase = true | |
[push] | |
default = simple | |
[user] | |
name = <name> | |
email = <email> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment