At work we used SVN until now for a project (we use TortoiseSVN). For the same project, someone from another country uses GIT and made changes to it. We want those changes on our project, and to push it back to the remote project on their server. I already pulled the project and now have their version in a folder and our version in another SVN-managed folder.
Say, one of us(me) wants to sync with the GIT project. How should I merge the GIT project with my local SVN one, push it to the remove GIT server, and push further modifications that may come from us working internally with SVN?
We are still going to use SVN internally, but want to sync our project with the remote one, and push and pull with its continuous changes from both parts. This will be done with GIT.
I already pulled the GIT project locally, and now have that folder and our SVN folder, but don't know how to merge them.
There are multiple possible answers depending on what you are trying to do.
If you want to avoid Git because you don't want to learn a new tool, then I can only advise to reconsider. Git is the most widely used SCM these days, the basics are not that hard to learn, and they are in any case easier to learn than a Git<->SVN bidirectional bridge.
If you want to keep using SVN because you do not want to publish your local history, then learn more about Git, there are tons of features meant exactly for this use-case in Git. You don't need a separate tool for that.
If you want to keep using SVN because you have a requirement to do so internally, and you don't want to publish your local history, then you can merge manually by having an SVN checkout and a Git repository side by side. This will be more error prone and more complex than all the alternatives. At the end of the day, you would
git checkout
to yesterday's commit (you have nothing to do if you kept yesterday's Git worktree in the same state as it was).copy your SVN checkout to the Git clone, and
git commit
the result. This creates a commit whose parent is yesterday's commit, i.e. the common ancestor between your SVN history and the new Git history.merge with the upstream Git branch. This creates a new Git commit that contains both your changes and the upstream one.
push the result (this contributes today's change to upstream)
Copy back the worktree files from Git to SVN, run
svn add
,svn rm
when appropriate.svn commit
the result (this takes the remote Git changes to your local SVN repository).This should be relatively easy to script.