Mike Wills
Mike Wills

Reputation: 21275

Push code to SVN and GIT

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?

Upvotes: 0

Views: 1673

Answers (3)

Dmitry Pavlenko
Dmitry Pavlenko

Reputation: 8988

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.

Upvotes: 0

Mike Wills
Mike Wills

Reputation: 21275

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.

Upvotes: 1

Michael Krelin - hacker
Michael Krelin - hacker

Reputation: 143319

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?

Upvotes: 1

Related Questions