Hacker News new | ask | show | jobs
by manojlds 3779 days ago
Um, mostly no. This can be trivially detected only when you are changing things already pushed.

Being a dvcs, you create atleast one commit on your local repo before pushing to a remote. That one (or more) commit can be changed to point at anyone and pushed.

1 comments

Mostly yes. You rewrite the whole history from the commit you changed authors on and onwards so git will let you know that you have two conflicting histories that needs to be merged. This is why the author needs to force push to master.

The only exception to this is if someone else has not pulled into their private repo any changes at or before the commit you changed.

What I am saying is that this tool can be used exclusively while creating commits. Not for retroactive changes.