Possible Duplicate:
How do you roll back (reset) a git repository to a particular commit?
I have the following revisions in order r1, r2, r3, r4, r5 in origin/master.
- How do I revert the entire code base to a previous snapshot in a certain branch (say
r3) - If I do [1], will subsequent commits say
r4', r5'be on top ofr3and we will not have any reference tor4, r5in the code base.
git reset --hard r3will revert your currently checked out branch back tor3.r3. You will lose any reference tor4andr5, unless something else is pointing to it besidesmaster.The first part of your question is a duplicate, but I created this answer since you are asking for a little more detail.