Skip to content

Instantly share code, notes, and snippets.

@pgasiorowski
Created July 1, 2019 12:13
Show Gist options
  • Save pgasiorowski/a788f58493a71a25919134c696b4c35a to your computer and use it in GitHub Desktop.
Save pgasiorowski/a788f58493a71a25919134c696b4c35a to your computer and use it in GitHub Desktop.
Git - squash commits in feature branch for review
# Checkout master
git checkout master
# Create new brach from master
git checkout -b 51172-order-details-v4
# Merge the branch you worked (ie 51172-order-details-v3) as single commit into new branch (ie 51172-order-details-v4)
git merge --squash 51172-order-details-v3
git commit -m "Orders: Display more product details on orders page"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment