Linking repo subfolders with git

I have a project on Red Hat OpenShift (git) and a project on Bitbucket (git).

How do I link a subfolder of the Bitbucket project to a subfolder of the OpenShift project?

  • Problems pulling Storyboard from Bitbucket
  • BitBucket Jenkins doesn't automatically build
  • Change Credentials for Push in Git
  • Can't connect to BitBucket via ssh
  • Tell git to ignore my RSA public key
  • automated deployment from bitbucket to iis on windows server
  • (so that making commits in one subfolder makes those same commits in the other)

  • Is there a GITS in GIT?
  • Is it bad to commit all files always on git?
  • Git status shows a weird string as an untracked file
  • how to update file in github via ubuntu
  • Find out who is the admin(s) for a git repo
  • Assert that submodule always pointed to a valid commit
  • 2 Solutions collect form web for “Linking repo subfolders with git”

    Git has a feature called submodules that allows you to do this; the cost is some added complexity when updating the project. OpenShift should handle the submodules correctly, but I haven’t personally tried it. If you want to see how OpenShift handles submodules for git repos, please take a look at this script.

    Add both repositories as remotes to your local clone, and propagate commits with git fetch/push. If the servers can push to each other, and you have the ability to run hooks on them, you could set up an update-hook on one of the servers so that it automatically pushes to the other. See githooks(5)

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