Hacker News new | ask | show | jobs
by LinuxBender 3779 days ago
This was also being discussed here [1]

[1] https://news.ycombinator.com/item?id=11049993

Apparently it will be obvious to folks that this has occurred.

2 comments

We moved the comments here from a later thread that hijacked "Show HN" (https://news.ycombinator.com/item?id=11053078). We also rolled back the clock on the current thread so it would go to the same position on the front page. It's still not really a fair swap because the other post has most of the points, but people will probably keep upvoting this one.
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.

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.