Skip to content

Instantly share code, notes, and snippets.

@ameenross
Last active March 13, 2024 12:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ameenross/6642fd34b5ba4aaebe5dc9d3079de4bf to your computer and use it in GitHub Desktop.
Save ameenross/6642fd34b5ba4aaebe5dc9d3079de4bf to your computer and use it in GitHub Desktop.
git PSH - Git alias to pull with rebase, then push. Its superlative, git PSHHH, to stash changes before git PSH and unstash afterwards.
# git psh(hh)
git config --global alias.psh '!git pull --rebase=merges; git push';
git config --global alias.pshhh '!git stash; git pull --rebase=merges; git push; git stash pop';
@ameenross
Copy link
Author

ameenross commented Aug 16, 2018

Pshh!

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