Question

Imagine you are working on some code, that needs to be checked into the 'official vcs' (A). But you also want to check the code into your own vcs (B).

A (this can be SVN or git) and B (git). I will need to pull changes from A, but not from B (B is for my own use only).

What is the best way to solve this?

I am thinking of some checking into A, and using an Ant target to copy the src to a clean directory and check in that one into B, so I can pull changes easily from A.

Is that the best way? Anyone dealing with this already and having some advise?

thanks

Was it helpful?

Solution

Do you need B to be a remote repo?

In git, you work on your own repo, that usually is a clone of a remote repo. So, it's a full repository. You commit to it, you checkout branches from it. And you connect it with other repositories for synchronizing commits.

If you don't need B to be a remote repository, you can just git clone a remote git repository, or git svn clone a remote SVN repository. Then, you'll have two repositories, that would be synchronized as you pull/push/dcommit/rebase.

If you need your B repository to be remote, you can always add another remote with git remote add and push/pull to/from it, independently of when you synchronize with A repo, independently of A repo being git or SVN.

OTHER TIPS

Git + git-svn

"Own" VCS is local Git-repo, for external Subversion you just add Subversion-remote

If both A and B are git, your repo can have multiple remotes.

For example:

$ git push origin
$ git remote add myPrivateRepo /path/to/the/private/repository
$ git push myPrivateRepo
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top