Reputation: 349
Background: I am self-teaching networking course via Stanford's MOOC. However, Stanford MOOC doesn't have hands-on lab assignment so I decided to use Princeton university's assignment that is available to public as my assignment. (Here's Princeton's Network assignment for those that are interested).
In this case, what is the appropriate way of merging my currently existing repository (where I push my notes and work on labs based on books) with Princeton's assignment repository? Since I'm not really contributing the Princeton assignment as well as I want to have one single repo, I was refraining from forking Princeton's repository.
Easiest way that I can thing of is cloning Princeton's assignment repository to my local machine, removing .git
file from cloned repository, dumping the whole content inside my currently existing repository, then pushing. But before I do that, I would like to hear second opinion based on more experienced users. Thank you for you advice in advance!
Upvotes: 0
Views: 23
Reputation: 1323135
Since I'm not really contributing the Princeton assignment as well as I want to have one single repo
That means you can push your local clone of the Princeton's assignment repository to your "currently existing repository (where I push my notes and work on labs based on books)" as an orphan branch.
cd /local/clone/of/Princeton
git remote set-url origin /url/of/your/current/exisiting/repo
git push -u origin master:princeton
That will push the master
branch of the local clone of the Princeton repo to your existing unique remote repository, but in a branch called "princeton
".
That new branch will have a separate unrelated history o your current repo master
branch.
Upvotes: 1