Jump to content

[GUIDE] How to "check out" GIThub from Windows


Recommended Posts

Hi,

Is there a command so I can revert my mangos source to previous revision? Like rev 7029?

Thanks

git reset --hard <revspec>

where <revspec> can be absolute "link" -- ie. the SHA1 of a commit

or it can be relative, like HEAD~4 (4 revs back), HEAD^^2 (2 revs back to the second merge parent)

Freghar posted it, its the 8th post in the thread. after others had already posted your question.

Link to comment
Share on other sites

git reset --hard <revspec>

where <revspec> can be absolute "link" -- ie. the SHA1 of a commit

or it can be relative, like HEAD~4 (4 revs back), HEAD^^2 (2 revs back to the second merge parent)

Freghar posted it, its the 8th post in the thread. after others had already posted your question.

revspec can be for example a search command:

git reset --hard :/[1234]

should work too (it will search each commit's message for a matching string and use the first that matches).

(many people probably know the slash '/' as a classic search in many text editors .. and '?' sign for backwards search (I'm not sure if that's implemented here)).

Link to comment
Share on other sites

  • 4 weeks later...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use