Jump to content

Recommended Posts

Posted
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.

Posted
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)).

Posted
If however 1234 is present in both master and mangos-0.12 you may not get the one you want..

I believe it searches down the parents, ie. if you run this from a master HEAD, it never gets to mangos-0.12 .. at least I would guess.

edit: ah, I see, you were right ..

  • 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