Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 2
Message 1 of 4

Best workflow for standard software

We have one standard software that is updated frequently. Programmers use this software for every machine and add some special features, some of these special features influence the standard software and some special features are only used for this specific machine. Does it make sense to create a repository for every machine? Or just branches from the standard project? I'm afraid that some programmeres merge their specific feature with the standard and after that nothing will work anymore.

 

3 Replies
Copilot Lvl 3
Message 2 of 4

Re: Best workflow for standard software

Hi,

 

I would suggest you use a branch for each machine.

e..g you have the default non modified master branch and then create a branch named machineA, machineB, machineC.

This allows you to keep in sync with new versions from the master version.
You could then use branch protection https://help.github.com/en/articles/enabling-branch-restrictions to disable any merges or pushes to the master branch

Copilot Lvl 2
Message 3 of 4

Re: Best workflow for standard software

Thank you very much! Is it possible that the standard branch can be modified? For example when one special feature is used very often in the branches, that a administrator or something adds this feeature to the master so it isn´t necessary to add the feature manually.

Copilot Lvl 3
Message 4 of 4

Re: Best workflow for standard software

>Is it possible that the standard branch can be modified? For example when one special feature is used very often in the branches, that a administrator or something adds this feeature to the master so it isn´t necessary to add the feature manually.

 

Sure, master is just one branch as any other, (usually it's the default one) branches are just snapshots of commits in time.
You have multiplke options:

1. Let's assume you have a branch master and machineA.:  The changes in branch machineA are maybe relevant for all others as well (let's say you got rid of all other machine types, or they no longer differ). Then you can merge your changes from machineA into master. Or alternatively, you can make the branch machineA the new master.
2.  While developing a feature for machineA you disovered and fixed a bug fix in branch machineA which is relevant to all other machines as well.  let's assume it's one or multiple commits. You could then cherry pick the commit on the master branch. This means you apply the speifcied commits (the ones containting the bug fix) on top of the master branch.

 

Foir some clarificaiton of the general concepts of Git, you might read here:

https://jwiegley.github.io/git-from-the-bottom-up/