Suppose you have one file in your repo and you have the following commits:
commit 1 : the file contains A commit 2 : the file contains B commit 3 : the file contains C
If you return to commit 3 , you will get this in the repo:
commit 1 : the file contains A commit 2 : the file contains B commit 3 : the file contains C commit 4 : the file contains B
And the file in your working copy will also contain B.
If you roll back you will get this in the repo:
commit 1 : the file contains A commit 2 : the file contains B
And the file in your working copy will be left unchanged. Thus, the file will contain C. It allows, for example, to correct a small error and try again.
JB Nizet Feb 23 '13 at 10:22 2013-02-23 10:22
source share