-
Notifications
You must be signed in to change notification settings - Fork 18
Create Secondary Repository for Existing Project
Another common use case scenario with git repositories is that we already have an existing repository that we would like to check into SrcBox (e.g. We work on an open source project hosted on github, would like to implement some things without pushing to github, but still having the code backed up just in case).
For the sake of the tutorial, I will clone the ruby on rails repository as the existing project:
$ git clone git://github.com/rails/rails.git
In order to import an existing repository into SrcBox, we have to be inside the specific repository we would like to import. Note, we specify the name with which to track the repository inside SrcBox.
$ cd rails
$ gitbox import rails
Creating empty repository...
Importing data into new repository...
Repository successfully imported.
If we list the tracked repositories now, our new rails repo should appear:
$ srcbox list
List of repositories tracked by SrcBox:
- srcbox
- myapp
- rails
Finally whenever we make any commits, we can decide where to push the changes.
$ git push origin
$ git push srcbox
Note, that the SrcBox repository (remote) will always be called srcbox.