Last active
October 18, 2021 16:10
-
-
Save bcawrse/366fc34ac7addbffca81a6bad291cc5e to your computer and use it in GitHub Desktop.
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
# Set the editor to vim.. duh | |
git config --global core.editor vim | |
# Add aliases | |
git config --global alias.logthis 'log --decorate --date-order --graph --tags HEAD' | |
git config --global alias.logall 'log --decorate --date-order --remotes --graph --tags --branches' | |
git config --global alias.logalls 'log --decorate --date-order --remotes --graph --tags --branches --stat' | |
git config --global alias.diffc 'diff --cached' | |
git config --global alias.count 'count-objects -vH' | |
git config --global alias.package '"!f() { git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT $1..HEAD; }; f"' | |
git config --global alias.packaged '"!f() { mkdir -p \"$(git root)/$2\" && git package $1 | xargs cp --parents -t $2; }; f"' | |
git config --global alias.root '"!f() { echo $(git rev-parse --show-toplevel); }; f"' | |
git config --global alias.packfrom "!f() { git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT $1..$2; }; f" | |
git config --global alias.packedfrom "!f() { mkdir -p \"$(git root)/$3\" && git packfrom $1 $2 | xargs cp --parents -t $3; }; f" | |
git config --global alias.conflicts 'diff --name-only --diff-filter=U' | |
git config --global alias.rm-deleted "!f() { git ls-files --deleted -z | xargs -r0 git rm; }; f" | |
git config --global alias.add-rm "!f() { git ls-files --dleted -z | xargs -r0 git rm; }; f" | |
git config --global alias.add-new "!f() { git add $(git ls-files -o --exclude-standard); }; f" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment