What would be the closest git command equivalent to a svn command: "svn checkout -r 123 "?
Asked
Active
Viewed 487 times
1 Answers
3
git checkout -b myBranch <SHA1_for_r123>
You would update your working tree with the right SHA1 revision, while creating a branch in order to isolate any new commit you will make in that branch.
If you only did:
git checkout <SHA1_for_r123>
you would end up in a detached HEAD
mode.
-
@eckes: thanks :) I actually completed the answer since you made that vote. – VonC Apr 21 '11 at 09:10
-
@VonC It looks like you are racking up points at roughly 2k a week. I could have sworn you were on 477k when you answered my last query. At this rate there will be no points left for the rest of us very soon :) – vfclists Mar 23 '15 at 18:11
-
@vfclists that's what is neat with Stack Overflow: there will *always* be more than enough points for everybody else :) – VonC Mar 23 '15 at 18:19