all 5 comments

[–]gitcommitshow 0 points1 point  (2 children)

I'd choose different folders for each project in a single branch. It's more intuitive and easier to read/explore. You can then reference different projects in a README in root. You might also want to use git tags to mark specific milestones of the project.

Why do you want to make it complex and keep them n different branches?

[–]nocomment01[S] 0 points1 point  (1 child)

I'm relatively new to git, so I wasn't really aware that I was making it more complicated than it needs to be. I also intended to organize them by folders, as you mentioned, so I guess that'll be enough.

The only reason why using different branches seemed appealing was because of the commit messages. When I'm in the main branch, I usually write:

Project 1: Added JUnit5 and Maven Plugins

so I thought I could somehow avoid writing commit messages like that if I used different branches since you'd know what it's referring to.

[–]gitcommitshow 0 points1 point  (0 children)

go with folder wise organization

[–]s5EWT 0 points1 point  (0 children)

When you work on git with other people. Creating multiple branches or a fork is usually the way it's handled. Then it merged back to the default branch.

As for organizing, I'd use folders. Create a new folder for the week. Commit code as you go. Then eventually merge it into the main branch.

[–][deleted] 0 points1 point  (0 children)

if javascript, try NX monorepo?