D
D
David It2022-04-17 07:57:00
GitHub
David It, 2022-04-17 07:57:00

How to add a project to the repository correctly?

created a github repository called Chess1 ( https://github.com/David138it/CPP-Chess1 ). and I want to bring projects with several steps there, for example, the first one is the move of the king, the second move of the bishop, etc. I want one chess1 project to display these steps. did I add this project to my repository correctly with these files added there? I added step 1-5 and branch commits there. Is it correct to add this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Michael, 2022-04-17
@David138

What is a repository. In short, then:

  • File folder
  • Plus the history of changes to these files
  • Plus branches (variants) of these files.

Thus:
  • If the projects are independent, it is best to decompose them into different repositories
  • If the projects are dependent, for example, have some common libraries, it's best to put them in one repository, in different folders (and, let's say, in the common folder)
  • If projects are essentially one project, but with several options (for example: support for several different databases for storing data), then it makes sense to use branches. The essence of branches is that in the end they must either merge into the main branch, or die off. That is, branches are a tool for development, but not for storing projects.

So in your case, I guess using branches for your purposes doesn't make much sense. Use either different repositories or folders.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question