I was fortunate enough to obtain a free micro-plan Github account to use for my schoolwork through Github's EDU program. However, I am not sure how best to structure this for my CS classes. Ideally, I would have a different repository for each class -- CS101, CS102, etc. However, the micro-plan only allows up to 5 repositories, and I will be taking more than 5 classes within the next year or two. So, is there a way to structure one repository to keep commits 'separate' for each folder, i.e. have one repository with multiple 'sub'-repositories (basically a submodule).
Any advice is appreciated.
Thanks!
With Git, using multiple repositories is the only way to work efficiently. This enables each team to work independently, and do their work faster. You can also make sure that developers only have access to the repositories they need access to (thus making Git more secure.)
GitHub does not allow nested repositories (IIRC Git doesn't allow this for bare repositories). However, you can use submodules to nest repositories on the "client side" in the working tree. You need to clone the parent directory.
Yes. You can put multiple projects in one Git repository but they would need to be on different branches within that repo. The Git console in ReadyAPI gives you the ability to create or switch branches from the UI.
For each class, run within the repository git checkout --orphan <classname>
, and you can get a new parentless branch for that class's content.
When getting local copies of your repository, run git clone --single-branch --branch <classname> <url> <localdir>
, and it will only clone and later fetch that class's branch.
As trauzti said, I would definitely recommend a Bitbucket account. While the UI isn't as pretty as Github's, it has all the same functionality, and they do allow free unlimited private repositories. I use it for my schoolwork. If you really want to use Github though, then the above would work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With