Re: Reverting to old commit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Marcus schrieb:
Newbie question: What's the simplest way to find an old commit and revert?

Say you have a version from yesterday which worked and today's
experiments failed, so you want to go back to that working version.
Unfortunately, it's not tagged. Instead you need to actually view the
code to identify the version you want. I thought maybe gitk might
help, but I can't find my way with gitk. I hoped you could browse
revisions easier in a GUI and tell gitk or git-gui to revert?

Thanks,

Marcus
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Probably I misunderstood, but: do you *know* which version worked
well? I.e. when you start gitk, can you point to the working
commit and are just wondering how to revert to that one?

Then gitk's "reset ... branch to here" could help you. Right-click
the desired commit and reset the branch.

There's no need to have a tag for this. You can even create a
tag afterwards for any commit you like. It's just an alias for
the commit id (sha1).

If you cannot identify the working commit, then please forget
my answer and follow the "git bisect" proposals.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux