Migration of a Subversion (SVN) repository to the Git distributed version control system. In contrary to the CVS-to-Git migration, the guide does not make use of external scripts (like svn2git), as the Git built-in support of SVN is working reasonably well. For the following steps, it is recommended to use the GitBash command line under…
The following article describes how to migrate an existing CVS legacy repository to the more recent Git version control system, using the Tigris.org cvs2svn script.
The Git actually has some sort of direct support to import from CVS repositories, the git cvsimport command. However, although this command is better suited for incremental conversion from CVS to Git than the other alternatives, for one-time migrations there are some known issues. Therefore I prefer to use the cvs2svn bundle (specifically its cvs2git module) for one-time CVS-to-Git migrations.
So, you’ve called a git reset –hard on a wrong branch or did some other destructive action (perhaps a wrong rebase, amend etc.), and lost some important commit(s) in the repository.
Well, fortunately nothing is actually lost, and Git allows us to recover such detached commits. Even amended commits can be restored back to the previous state using the following technique.