-
Notifications
You must be signed in to change notification settings - Fork 18
Organize Repositories into Hierarchical Groups
The basic usage model of SrcBox (creating and maintaining all the repositories in a single folder) eventually becomes a bit disorganized as the number of repos stored grows. To cope with larger sets, the hierarchical grouping of repositories was introduced: instead of having everything in a single folder, sub-folders within the repository storage can be also used.
Creating hierarchically grouped repositories can be done simply by specifying a path besides the name of the repo:
$ srcbox create applications/android/quickzone
$ srcbox create applications/android/fractalflame
$ srcbox create applications/iphone/quickzone
Importing too can be done using paths too for organizational requirements:
$ git clone git://github.com/karalabe/srcbox.git
$ cd srcbox
$ srcbox import tools/srcbox
If listed, the above would appear as:
$ srcbox list
List of repositories tracked by SrcBox:
+ applications
+ android
- fractalflame
- quickzone
+ iphone
- quickzone
+ tools
- srcbox
Cloning again works by specifying the path too in case of groupings:
$ srcbox clone tools/srcbox
One side note: currently there is no command for moving a repository after creation/import. The reasoning is the same as with repository deletion: manual execution is more conscientious than with a program. You can easily reorganize your repositories by moving them around inside the SrcBox repos folder. The only thing to take care of is that after a move any repository already cloned will have an invalid path. Just re-clone the repo with the new path (do make sure all the changes have been committed beforehand).