Comment by kmoser
1 day ago
> Only amend commits that only exist in your local copy or you're gonna have a bad time.
"Gonna have a bad time?" I really wish things like this were explained in more detail, rather than with glib warnings that are unhelpful unless you already know what they mean.
The commit you're amending doesn't exist on your copy anymore, despite existing on the remote that you've pushed to.
Warnings about detaching the HEAD in git are so common that they're kind of assumed to be basic knowledge to a lot of people. Explaining why it's bad if you don't already know would take quite a while too.
I do wish git had some form of warning before you rewrite history that's been pushed somewhere. It should already have all the data to know that.