Last active
July 12, 2022 04:03
-
-
Save patridge/2556a7b8cb90f3efe6cf103fea417193 to your computer and use it in GitHub Desktop.
My current Git aliases
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
# To view any current aliases, run this: | |
git config --get-regexp alias | |
# `git tree` (and press Q to quit): Display a nice tree with branches. | |
git config --global alias.tree "log --graph --decorate --pretty=oneline --abbrev-commit --all" | |
# `git showtrackedignored`: Display normally tracked files currently being ignored. | |
git config --global alias.showtrackedignored "ls-files -i --exclude-standard" | |
# Push the current branch to my personal remote name choice (by default, technically configurable, but everyone should push to patridge too, apparently) | |
alias.pushu !git push --set-upstream ${1-patridge} $(git branch --show-current) | |
# Not sure how I was setting this, maybe via a config file somewhere? But this might be a one-liner option. | |
[UNTESTED, but runs without error] git config --global alias.pushu "git push --set-upstream ${1-patridge} $(git branch --show-current)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment