For reasons I will not go into explaining (unless required) I have two repos, a subversion and a git one, where my project (identical copies of it) is located. I need to keep it this way, if possible.
Hence, what I would like to accomplish in order to maintain consistency between the two, is to set up a directory on my machine where I can svn checkout
the project, work on it, and then push the changes to both the svn and the git repos.
I have read something about the git svn
command but from what I gathered it only serves as a way to use git locally and then push (rather, dcommit
) your work to the svn repo.
Nonetheless, I naively tried issuing: git svn init <url to svn repo> -s --username <uid> test
(did not prompt for pwd, did not checkout working copy, only created folder .git inside folder test) followed by: git svn clone <url to git repo> test
and it returned:
svn-remote.svn.url already set: <url to svn repo>
wanted to set to: <url to git repo>
However, my hopes are high thanks to this post here on SO: How to deal with Git-svn when have to use both Git and Subversion where it looks like the OP's workflow consists of both git svn dcommit
and git push
commands.
If there is a way to accomplish what I wish, could someone please instruct me step by step on how to do it?
Thanks in advance.
P.S. As an added bonus of this peculiar configuration, I would like to be able to svn:ignore a certain folder of my project but have it pushed on the git repo (i.e. the img/local folder must not be committed to svn since there is a rule saying it should be ignored, but there is no such entry in the .gitignore file, so I assume that files added to it will be pushed to the git repo, but not to the svn one, right?)