I have a GIT clone of an SVN repository. Based on the CAVEATS section of the git-svn documentation, it appears I cannot clone this git repository again:
For the sake of simplicity and interoperating with Subversion, it is recommended that all git svn users clone, fetch and dcommit directly from the SVN server, and avoid all git clone/pull/merge/push operations between git repositories and branches.
I was hoping I could share this GIT repository to other users, who can in turn dcommit directly to svn. This seems like a big restriction, as every other user needs to reclone the SVN repository or use rsync as suggested on the same page.
So first question is — am I understanding this correctly?
Secondly, can someone give an example of what this paragraph means? I am completely lost:
You must therefore ensure that the most recent commit of the branch you want to dcommit to is the first parent of the merge. Chaos will ensue otherwise, especially if the first parent is an older commit on the same SVN branch.
You can clone a GIT-SVN repository with GIT, but indeed there are a couple of caveats you have to beware of. I have moderate experience with GIT and have been using such a setup myself, YMMV though…
You can clone the GIT-SVN repository, but then (once for each clone) need to add the git-svn config to
.git/config.Furthermore, when you git-svn dcommit, this modifies the SHA1 sums of the commits, so if you fetch these via the git-svn mirror, your local git checkout will do a merge of two slightly different branches. To fix this, you can run
assuming you dcommitted from the master branch and the git-svn mirror is labeled origin.
Also I noticed that sometimes git-svn dcommit fails with an error which I cannot directly recall, but which can be solved by removing the relevant git-svn rev-map
It will be rebuilt automatically by git-svn.