Last active
October 11, 2020 22:58
-
-
Save neverendingqs/c03e72e4c61e3c73acb8 to your computer and use it in GitHub Desktop.
This file contains 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
[user] | |
name = firstName lastName | |
email = email | |
[core] | |
preloadindex = true | |
fscache = true | |
autocrlf = false | |
safecrlf = false | |
symlinks = true | |
commitGraph = true | |
editor = code --wait | |
[alias] | |
amend = commit --amend --no-edit | |
brm = "!f() { git branch --merged ${1-$(git get-default-branch)} | grep -v " ${1-$(git get-default-branch)}$" | xargs -r git branch -d; }; f" | |
cleanup = "!git checkout $(git get-default-branch); git pull -p; git brm" | |
cleanupr = "!f() { find . -mindepth 1 -maxdepth 10 -type d | grep -e ".git$" | xargs -I {} bash -c 'echo {}; git -C {}/.. cleanup; echo'; }; f" | |
diffc = diff --cached | |
fixup = commit --fixup head | |
filediff = "!f() { echo; git diff --name-only $1; echo; }; f" | |
get-default-branch = !git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@' | |
historysearch = "!f() { git grep $1 $(git rev-list --all -- $2) -- $2; }; f" | |
ignore = update-index --assume-unchanged | |
lsconfig = config --list --show-origin | |
mergefiles = "!f() { git show HEAD:$1 > $1.ours; git show MERGE_HEAD > $1.theirs; }; f" | |
restage = update-index --again | |
sed = "!f() { git ls-files -z | xargs -0 sed -i -e ${1}; }; f" | |
squash = rebase -i --autosquash $(git get-default-branch) | |
tree = log --oneline --graph --color --all --decorate | |
[push] | |
default = current | |
[pull] | |
rebase = true | |
[help] | |
autocorrect = 20 | |
[init] | |
defaultBranch = main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment