0

I have a git repository that contains two directories:

  • src: A full Rails app
  • devbox: Files to build a vagrant machine and provision using an Ansible script

I wish to split these out to two separate repositories so I have one solely containing my app and another containing the vagrant devbox.

This SHOULD allow me to add the app repo as a git submodule inside the devbox one in order to be worked on but at the same time allow Capistrano to grab the source from the app repo without any faffing around to only get a subdirectory of the full combined repository.

Any thoughts about how to go about splitting the current repo up? I'm just a bit unsure where to begin.

Hugo y
  • 1,421
  • 10
  • 20
rctneil
  • 7,016
  • 10
  • 40
  • 83

1 Answers1

0
  1. move the devbox folder out of the repo. mv devbox ~/Projects/
  2. move the src folder out of the repo. mv src ~/Projects
  3. create two empty repos on your github account for both devbox and src
  4. initialize devbox as git repo cd ~/Projects/devbox && git init
  5. Add the git remote. Instructions provided when you created the git repo on github. git add remote ...
  6. Push the repo to github git commit -am'initial commit' && git push origin master
  7. Repeat steps 4-6 for src
Zach Colon
  • 177
  • 2
  • 11