|
|
|
|
|
by rectang
1903 days ago
|
|
But because the commit has different metadata after amending, it now has a different SHA and is a different commit. For illustration, a minor inconvenience of amending the commit is that `git branch -d my-feature-branch` no longer succeeds for the original branch, because it looks for the actual commit SHA, not the tree. You may not care about the effects of changing the commit, but those effects are real and other people care. |
|
For those who have cloned the repo for testing, they can simply run git checkout my-feature-branch; git fetch origin; git reset --hard @{u} to get their local repo in sync with the remote.
So there's no reason that amending the commit will affect anyone until they branch off of the repo to do their own work. But that's nothing that a rebase can't fix.