Skip to content

Instantly share code, notes, and snippets.

@kseikyo
Last active February 4, 2022 02:25
Show Gist options
  • Save kseikyo/1f11a3fae04b74bef5a628b5377b1dc0 to your computer and use it in GitHub Desktop.
Save kseikyo/1f11a3fae04b74bef5a628b5377b1dc0 to your computer and use it in GitHub Desktop.
My git aliases

Type less, work less

I've created this for my own personal use, if you find these useful or want to share your own, feel free to do it so.

Simple ones

git config --global alias.st status
git config --global alias.lg 'log --all --graph --decorate --oneline --abbrev-commit'

More confusing ones

This was done with the purpose to improve the workflow when working with feature branches, where you need to push new branches quite often to the remote repo.

git config --global alias.pon '!git push -u origin $(git rev-parse --abbrev-ref HEAD)'

It is the equivalent of git push --set-upstream origin <branch_name> where branch_name is your current branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment