How can I do a git svn reset to HEAD revision without specifying the revision number?
How can I do a git svn reset to HEAD revision without specifying the revision numbe开发者_Python百科r?
It sounds like what you want is not a git svn reset
but a simple git checkout
. I'm not sure what you mean when you say you reverted to an older revision, but it may have been something like
$ git log
# scan through the log looking for a particular commit.
# You find it and its SHA1 is abc123...
$ git checkout abc123
You are now in 'detached HEAD' state blah blah blah...
Now, HEAD (in your git repository) refers to the commit with SHA1 abc123, whereas HEAD (in the central SVN repository) refers to the newest commit on the SVN repository. If you have things set up in a fairly typical way, then you can just do git checkout master
and then git svn rebase
and you're back to normal working conditions.
精彩评论