Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
# Call with a branch name to merge it and then reset backwards leaving
# all the changes from that branch in the working tree for ease of reviewing.
# The script assumes you are already on the branch you are merging to
# (e.g. master) and have updated your remotes.
# Once you're happy, pass "commit" to reset forwards again.
do_git_review() {
if git diff-index --quiet HEAD --; then