Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best pratice for multiple custom projects and Git

In my company we have a base software that gets customized for every client. Today using SVN we have a setup like this:

/trunk
/tags
    …
/branches
    /client_project_x
    /client_project_y
    /client_project_z

How would be the best way do organize this in git? Have a remote repository for each project and one for base code or having a big remote repo with several branches?

If we use a big remote repo with several branches, there's a way to clone just one branch from a remote repository?

like image 369
Marco Pompei Avatar asked Sep 04 '12 13:09

Marco Pompei


People also ask

How many developers does it take to use Git best practices?

You can use these Git best practices from a small group of two to ten developers. so let's start #21. Define code owners Useful code review is crucial for any successful project. But sometimes it's not clear who should review it. And this practice depends from team to team. You can assign owners for different codebases.

What can I do instead of using Git?

Instead of using Git, use a useful build/dependency tool. There is one out there for (almost) every software stack. These package managers can manage your project dependencies. Package managers download your project dependencies in each build for you. Your repository stays organized.

What are the best Git workflow best practices?

This section of Git best practices is about the Git Pull Request Best Practices. So you can use these Git workflow best practices in your team. Pull Requests are vital as they help ensure that quality code. Short pull requests allow developers to review and quickly merge code into the main branch efficiently.

What are the best practices for git branch names?

Also, short and meaningful git branch names are more helpful. For example, if you have to merge two branches. merge branch 'bug_fix_billing-module-is crashing-when-string-date-has-some-invalid-character-in-it' merge branch 'bug_billing_module.' #40. Avoid the use of all naming conventions


1 Answers

Conceptually, there is no difference between multiple branches in one repository and branches in multiple repositories. The whole point of DVCS is to remove that distinction. You want to think of it in terms of the people who need to access and control any given branch. If it's common to every developer to access code from every client, then it's going to be easier to put them all in one central repo. You can pick which branches you want cloned or not, although cloning an entire repo is the easiest. If you need to have very different access permissions in different branches, it's preferable to create separate repos for them.

In other words, set it up in whichever way makes it easier for the development and test teams.

like image 114
Karl Bielefeldt Avatar answered Sep 28 '22 02:09

Karl Bielefeldt