Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

Pardon me while I git push -f..


You should probably reread git’s documentation if you think git push -f rewrites any commits. It doesn’t. It makes new commits and re-assigns the named branch to track the new commits you just pushed. It rewrites branch names, not commits.

It is impossible (without finding a SHA collision) to rewrite a commit in git.

And before you say “yeah but how do you know which SHA sums are the right one if you don’t trust branch names”, please reread the final paragraph of the post you replied to.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: