1

I have a bitbucket repo A that I've been using for development. The production code is only a subset of the code on bitbucket repo.

I want to continue using repo A for development and migrate only the production code subset to repo B. Is this possible?

i.e.

Source repository A

(Bitbucket)

    /src
      /a.py
      /b.py

New repository B

(GitHub)

    /src
      /a.py

(repo B has no b.py).

Nick Volynkin
  • 14,023
  • 6
  • 43
  • 67
Peyman
  • 1,058
  • 1
  • 14
  • 27
  • possible duplicate of [Detach subdirectory into separate Git repository](http://stackoverflow.com/questions/359424/detach-subdirectory-into-separate-git-repository) – Nick Volynkin May 18 '15 at 18:42

1 Answers1

1

This is what git-submodules are made for. If your production code can be separated to a single directory, you can use git-subtree to easily organize a submodule.

Then you'll be able to manage production code as a separate repo and have it on GitHub without all the other code.

Community
  • 1
  • 1
Nick Volynkin
  • 14,023
  • 6
  • 43
  • 67