There's new GIT instructions on Github now

Andrej Mitrovic andrej.mitrovich at gmail.com
Sun May 22 11:21:11 PDT 2011


On 5/21/11, Walter Bright <newshound2 at digitalmars.com> wrote:
> On 5/20/2011 3:05 PM, Andrej Mitrovic wrote:
>> I would also like to know how to uncommit a change which hasn't been
>> pushed yet. So if I locally do:
>> git add someFile.d
>> git commit -m "woops wrong comment"
>>
>> I'd like to just uncommit that message. I couldn't find an easy way to
>> do this.
>
> What I do is rm -rf the entire project directory, then re-clone it from
> github.
> Voila!
>
> (Yes, I suck at git. But I like it anyway.)
>

Turns out all I had to do after I commited was edit the file I messed
up, add it again and do a commit --amend:
git add fileThatsFixed.d
git commit --amend

And then I can edit the last commit message, and it replaces the
previous message.

No rebase shenanigans or whatever I was recommended.


More information about the Digitalmars-d mailing list