how check in code in two differents vcs

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).

  • Dealing with glade files in DVCs
  • How to migrate from a complicated subversion repository to a distributed version control system?
  • Distributed Version Control “killer applications”
  • How Should I Handle a Plugins Repo Using Git?
  • Managing aesthetic code changes in git
  • Locking binary files using git version control system
  • 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?


  • Git client with “autopush”?
  • Git: How to find which branches a commit was merged into?
  • Add file to XCode project but NOT git using XCode only?
  • Only allow 'git push heroku master' from the master branch
  • Is it possible to perform a 'grep search' in all the branches of git project
  • git add causes corrupt index error
  • 3 Solutions collect form web for “how check in code in two differents vcs”

    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.

    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
    Git Baby is a git and github fan, let's start git clone.