Skip to content

Instantly share code, notes, and snippets.

@mucaho
Created January 16, 2026 11:51
Show Gist options
  • Select an option

  • Save mucaho/c313a02c8656c2a46f72f4d6888992f4 to your computer and use it in GitHub Desktop.

Select an option

Save mucaho/c313a02c8656c2a46f72f4d6888992f4 to your computer and use it in GitHub Desktop.
Review code is properly merged into release branch
git fetch
git checkout LATEST_COMMIT_SHA_WITH_BASE_BRANCH_MASTER
git log --merges -n 1
# this returns LATEST_MASTER_MERGE_COMMIT_SHA
git rev-parse LATEST_MASTER_MERGE_COMMIT_SHA^2
# this returns LATEST_MASTER_SHA
git diff origin/RELEASE_XYZ --ignore-all-space -- $(git diff LATEST_MASTER_SHA --name-only)
# in red it shows the final version on RELEASE_XYZ branch
# in green it shows changes that you had in your branch that did not make it into the RELEASE_XYZ branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment