Skip to content

Instantly share code, notes, and snippets.

@douglascayers
Last active October 14, 2022 15:33
Merge current branch into another then switch back
export HEAD=$(git branch --show-current) && \
git checkout -B staging origin/staging && \
git merge --no-ff $HEAD && \
git push && \
git checkout $HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment