Skip to content

Instantly share code, notes, and snippets.

@patridge
Last active July 12, 2022 04:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patridge/2556a7b8cb90f3efe6cf103fea417193 to your computer and use it in GitHub Desktop.
Save patridge/2556a7b8cb90f3efe6cf103fea417193 to your computer and use it in GitHub Desktop.
My current Git aliases
# 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