|
![](/i/fill.gif) |
>> Rather /more/ irritating is this: I made a commit, and then realised the
>> description was wrong. (NetBeans defaults to using the exact same
>> description as the previous commit - because that's SO USEFUL, right?)
>> So I looked for the command to undo the last commit. Apparently there
>> isn't one.
>
> Trick learned from mercurial (hg): always work on a secondary repository
> (not the "reference" one). Even better, a tertiary or deeper one.
> If you did a wrong commit on the secondary, instead of pushing back
> (well, its "git push" !) to the parent, just delete it and start over
> (you might keep your delta first with some patch-compatible commands, so
> as to reply them automatically: "hg diff" is very useful, i guess there
> is some version for git too)
Presumably you could just delete the .git subfolder and recopy... oh
wait, you're supposed to do git clone, aren't you? I wonder if that does
anything extra beyond just copying the files...
> Basic of distributed revision control: as long as you did not export
> your commit, you can hide your fault by just deleting the whole issue.
> Once exported, you're doomed.
Well, yes. Once it's public, it's part of history. And then if you want
to change it, you must rewrite history. Which isn't easy...
Post a reply to this message
|
![](/i/fill.gif) |