3 ms·
> What is to be gained from committing a change to a file, then a commit to undo the previous one if you decide the change wasn't useful/needed? "Undo" commits
by HelloNurse 6y ago
> What is to be gained from committing a change to a file, then a commit to undo the previous one if you decide the change wasn't useful/needed?
"Undo" commits make sense, occasionally, to fix recent incorrect or improper changes that have been already pushed.
But the more appropriate way to discard changes is leaving them to rot in the commits of a dead experimental branch, avoiding to merge them into the important branches from which releases are made.