HomeProgrammingGit SVN Error – Fixed

Git SVN Error – Fixed


While working on a SVN project using my new favorite tool, “git”, I ran into a small problem. A network bobble caused the subversion portion to fail. I stopped it, but then when I tried again, git said:

Cannot dcommit with a dirty index. Commit your changes firstor stash them with `git stash'.

Some searching found the solution:

$ git checkout $branch

$ git log -g
(look for your last commit, copy the hash for it)

$ git reset --hard $hash

$ git svn rebase

$ git svn dcommit

It worked perfectly, and I can once again use git side-by-side with the unwashed legions of SVN users.


I started out going to college for Business administration but soon found out that Coding would be a great way to have a sustainable career! I made coder's eye as my personal journey on learning how to code and sharing my Findings along the way. My vision with CE now is to be a way to help beginners that want to learn code but don't know where to start.


Sorry, the comment form is closed at this time.