Skip to content

Instantly share code, notes, and snippets.

@DevWouter
DevWouter / git.md
Last active July 2, 2020 11:08 — forked from peterjwest/git-cleanup.sh
Git aliases

git pushup - Pushes a branch and sets the upstream to be the branch of the same name (useful if your git push.default is simple):

On Linux:

git config --global alias.pushup \!'git push --set-upstream origin `git symbolic-ref --short HEAD`'

On Windows:

git config --global alias.pushup '!git push --set-upstream origin `git symbolic-ref --short HEAD`'