git rm
on wrong files. With subversion, if you do svn revert
before commit, the old copy of the file gets restored (and, of course, removal will not be scheduled for commit).With git,
git checkout
should, in theory, do the same. Googling about the problem, I found a tip that I should use git reset
. However, neither did that restore the accidentally deleted files. Finaly, I experimented a bit and found out that git reset --hard
does the trick. Before experimenting, I did, of course, make a backup of the whole repository to another place.Now, I'm going back to subversion, which is much more intuitive to use. My work is too valuable to be stored in version control system with which I must experiment to achieve even the simplest of operatons. Yes, I found the
--hard
option in the documentation, but its explanation was so opaque that I wasn't sure whether it would achieve what I wanted.Next time I'll be wanting to use a DVCS, I'll use Mercurial, as before.
No comments:
Post a Comment