How to manage multiple projects based on the same template in git?

I recently wrote a very simplified and general piece of blogging software using Rails, which I now posted on github.

I am relatively new to using git, but I would like to use this project as a template for developing another project where I need similar functionality (the ability to post something, leave comments on it, etc.). I also want the opportunity to make changes from my new project back to the old one, I have to find an error or come up with a new general functionality that I want to postpone.

What would be the proper way to handle this setup in git? Should I fork my original or clone it and click on a new repository, then add the original as a second remote or something else?

+3
source share
2 answers

Cloning in this case branches out, so there is no difference. In both cases, you get a story, all you need (more precisely, what you specify / by default).

The approach you mentioned will be a way, yes.

Subsequently, you can insert individual changes into the original repo to apply the changes there.

+2
source

I have not done this before, but I was in a situation of creating templates for version control repositories. This is how I will do what you want.

  • . - .
  • , .
  • -, , . , : .
  • , .

, . .

.

+2

Source: https://habr.com/ru/post/1792948/


All Articles