I have a project that I want to push to GitHub and our internal SVN server. I have seen many references to using git-svn, but that appears to be using git commands to push to SVN and only to one server. I want to push the changes to our internal SVN server and to GitHub. Is this possible? How would I set it up considering that the project is currently setup with GitHub?
Asked
Active
Viewed 1,632 times
3 Answers
1
You can push git-svn
repository to github as well, just make sure you push it after pushing to svn
, because git-svn
will modify history (it adds svn revisions to the commit messages).
But why would you do that, anyway?

Michael Krelin - hacker
- 138,757
- 24
- 193
- 173
-
Internal source versions vs. external – Mike Wills Dec 21 '11 at 21:20
-
We just haven't decided on a direction for that yet. – Mike Wills Dec 21 '11 at 22:14
-
1I agree, you need two commands: first `git svn dcommit` then `git push` maybe you can setup a hook to automatically push after dcommit but in any case it'll be a HELL to keep both repos in sync. – Samus_ Dec 22 '11 at 01:13
-
Yes, @Samus_, though this scenario is possible, I'd recommend against it unless absolutely unaviodable. If you haven't decided, you better don't go this way. – Michael Krelin - hacker Dec 22 '11 at 08:58
1
I added .gitignore
and .git
to svn:ignore
and .svn
to .gitignore
. I can commit changes to a svn repository and the same project to a GitHub repository.

Mike Wills
- 20,959
- 28
- 93
- 149
0
You can install SubGit into your internal SVN server. It will create a linked Git repository that is kept in sync with the SVN repository. You may consider it as Git interface to your SVN repository.
So now you can clone this Git repository, work with it and push it back to the internal repository and to GitHub.

Dmitry Pavlenko
- 8,530
- 3
- 30
- 38