@mott555 said:
Wonder rewriting history is even a thing....oh because it was probably easier to write that feature than fix the stupid push command using a random username.
Rewriting history (via "git rebase --interactive") is super useful if you're like me and you make a billion little "checkpoint" commits throughout the day (so you can roll back to a known-good state when you fuck up your code while working on it). At the end of the day (or whenever you want to publish your code), you can combine those billion little commits into a series of larger commits that make logical sense, rather than having to worry about that while you're in the middle of coding. You can even reorder (or remove) commits, if that makes the history make more sense.
Another thing to remember is that git branches are (like in SVN) labels to a given commit and its history. But -unlike SVN- every significant change you make to your local repo is kept around -by default- for 90 days.
So, if you (somehow) seriously screw up a history rewrite, and didn't label the branch that you started from (or make note of its commit hash), you can dig around in git's history to find the commit hash and make it a branch.
This is all substantially less complicated than it might seem. (It seemed pretty complicated to me when I was starting out, but I played with it for a few days, grew to understand it, and now can't live without the power that this way of working gives me.) Additionally, I'm pretty sure that 90% of Blakeyrat's problems with git have to do with whatever shitty GUI-over-top-of-git he has been forced to use that day. I exclusively use the git CLI and never run into the issues that he does.