Skip to content
Discussion options

You must be logged in to vote

The resolution is a philosophical shift from liking only clean, linear history to liking branch stability and easy rollback.

Step 1: Alter the Merge Strategy (Use Merge Commits)Instead of forcing Fast-Forward or Squash, the team can employ Standard Merge Commits (or a local "Rebase-and-Merge" convention with a single merge commit). This creates a non-linear but recoverable history with a Merge Commit M linking the feature branch to main's history M1 and M2. Why it works: A merge commit can safely be reverted using
git revert -m 1 <merge-commit-sha>
This successfully undoes all the modifications out of the feature branch without affecting subsequent commits to main and without destroying t…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Litis-Trion250
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question Ask and answer questions about GitHub features and usage Programming Help Discussions around programming languages, open source and software development
2 participants