Maintaining multiple copies of the same file in different repos under different revision control systems


I have developed a wordpress plugin. It’s a jQuery slider.
So, it includes code for slider (in jQuery), let’s say in slider.js and also the wordpress php files for admin panel.

  • Error on branch creation: “warning: refname 'master' is ambiguous.”
  • JGit HTTPS cloning is not working
  • How do I push a new repo to a remote?
  • Add FOSUserBundle to project git repository
  • How do I tell Git it got moves/renames wrong (false positives)
  • Multiple git editors
  • Now, I have to maintain 3 different project folders.

    1. Folder/directory involving jQuery file + php files for wordpress plugin repository. WP uses svn, and a specific folder structure to host plugins there.
    2. Folder for github main project ( includes jQuery + php files)
    3. Folder for github pages for gh-pages branch. This folder contains only jQuery files (not the php files used for wordpress) as I am only showing demo of my slider on gh-pages


    Whenever I update my slider.js file, I need to manually update it in all three folders and push all the three repositories separately.

    I need some easy solution to automate the problem.


    feel free to suggest edits in question or title.

  • How to capture a git commit message and run an action
  • Safe to keep .git directory in web root?
  • Unable to push in Git
  • How to find which files have not changed since commit?
  • What can cause data loss in git?
  • Git merge one branch in all other branches
  • One Solution collect form web for “Maintaining multiple copies of the same file in different repos under different revision control systems”

    Probably the best answer for this is to learn how to use git-svn to create a git “clone” of the svn repository, that is able to correctly interact with the original repository for fetching new changesets and contributing new ones. This is a somewhat different workflow than just plain git, though, so there’s a learning curve.

    In addition, learning to use git submodule correctly, and fully separating the jQuery bits into one repository, and the php bits into a separate repository that is a submodule of the main repository (or some other arrangement of main repository with submodules – I’m not entirely sure which makes more sense to have has the main) would help. Again, though, there’s a learning curve involved, so it may take some time. Proper use of branches in the various repositories is also critical.

    For the short term, figuring out the list of commands needed to be run after one copy of the file is updated, and using them to write a script to propagate the changes into the other repositories will reduce the manual workload and help avoid mistakes.

    Git Baby is a git and github fan, let's start git clone.