Reputation: 11
I have a project we've been working on that is a tool which visualizes word embeddings on certain trained data. This was a small school project that we are kind of done with.
Now, I want to take this further by letting users upload their trained models and giving them the tool of visualization. This future project will contain much of the previous project's code. However, I want both to be two separate 'products' because I do not want to mess with our first project's code. Should I branch on the first project, or should I create a new repository?
Upvotes: 1
Views: 787
Reputation: 822
I think the question you are asking falls into a long going debate between mono-repository vs. multi-repository project.
This post (https://medium.com/@patrickleet/mono-repo-or-multi-repo-why-choose-one-when-you-can-have-both-e9c77bd0c668) discussed some of the things you want to consider before making the decision.
I would say if it is a hobby project, I will suggest using mono-repository strategy because most likely you won't have the time or money to invest on a synchronized build infrastructure that fetches and assembles from different repositories. If modifying and modularizing your code seems to be too much work. I suggest opening a new repository, plan ahead for two products as a group, migrate the code, and dump the old repository.
This project I built as my own reminder notebook is a fairly straight forward mono-repository project:
https://github.com/tianhaoz95/developer-note
as there are many mini projects in the project directory, and they all share the same Travis or CircleCI build infrastructure.
Feel free to send me messages if you want to discuss this topic.
Upvotes: 0
Reputation: 374
You have two options as of now, you can either fork it or you can make a branch. I would suggest that you fork it and start working on it rather than creating a branch as you want to keep two entities of the code separate so it's better you keep in two different repositories. Which would save you a lot hassle when you make the product live. Although in the end, it's your judgment call. Hope you got the answer you were looking for!
Upvotes: 2
Reputation: 584
I'd suggest fork the repo. A branch in on the same repo suggests to me at least that this is some old version of the product or a feature branch. I'd think about what these strategies mean to people who see it. If nobody would think about a separate product being in "just" a branch then fork the repo.
Upvotes: 1
Reputation: 799
You can create new branch for all of them and keep your data in another branch so that both branches will run parallel without messing up each other's code.
The commands for creating new branch is :
Before creating a new branch, pull the changes from upstream. Your master needs to be up to date.
$ git pull
Create the branch on your local machine and switch in this branch :
$ git checkout -b [name_of_your_new_branch]
Push the branch on github :
$ git push origin [name_of_your_new_branch]
Hope it works!
Upvotes: 0