-5

We have a team of 6 developers working in multiple technology stack. Most of these developers have little experience 1 - 2 years to be precise.

We are very successful on enforcing coding standards because we are using coding standards checker in our ide's .

However we have a hard time getting the team to follow our git workflow, especially regularly committing and pushing code.

Is there a way we can enforce this without sounding too demanding to our developers ? How do you go about it in your organization, what works for you when it comes to following git workflow ?

6
  • 1
    It will probably be useful to know what is your relation to the developers, i.e. are you a project manager, are you a developer yourself, do you collaborate with the developers? Perspectives will probably vary a bit depending on who is asking. The crux of the problem boils down to understanding, so communication will probably be an important factor. Dec 23, 2019 at 14:00
  • @VectorZita I the Engineering Manager, and our team is an hybrid of a remote and brick and mortar. The thing is our developers tend to commit only once per day, or don't commit code at all in 2 to 3 days.
    – salimsaid
    Dec 23, 2019 at 14:40
  • Can you explain why you feel only committing and pushing code a few times a week is a problem? Does it slow down any processes you have in place? Dec 24, 2019 at 11:00
  • We had an incident where one of our developer's laptop got stolen in public transport. He had not committed code for the past 5 working days. On this situation alone we lost 5 days worth of work due to a theft incident. This is among the reasons why i think committing and pushing regularly is a good idea.
    – salimsaid
    Dec 24, 2019 at 11:14
  • 1
    @salimsaid, how did the developers feel about the lost work due to that incident? Did you ask them for suggestions how to prevent a similar incident would cause a significant loss of work? Where a similar incident could also be a corruption/defect of the harddisk. Dec 24, 2019 at 12:08

2 Answers 2

5

Its best to consider anything on an individual developers computer to be outside your control. You can ask them to follow a certain pattern (and if you're employing them, then you can coerce them to do so, within reason), but ultimately its out of your hands. This also includes locally enforced coding standards; If you really want to be sure that the code follows a certain pattern, do it on the server.

With that in mind, you need to look at what you do have control over, probably the central git repo and build server. You can create pre / post commit hooks to ensure that branch names etc. follow a particular pattern, and that builds are passing.

Ultimately though, the development process will work better with a concensus between developers and management. Rather than having what are perceived to be arbitrary rules applied, Its probably worth explaining your rationale, and asking why the developers are not following your preferred patterns. Maybe there is something particularly awkward about them that mean they are difficult to implement. You might find that they have a better solution to the problem you're trying to solve.

1
  • i'll try to look into the option of checking for ways to enforce following our git workflow. i.e. provisioning a server for checking if code meets our workflow standard. Thanks.
    – salimsaid
    Dec 23, 2019 at 14:42
0

What you are saying hardly makes sense. The way to mitigate a random almost impossible theft is to have all developers commit code when it suits you, rather when it suits their development processes ?

Based on this the answer is :

You don't. Unless there is substantial reason and a real problem to be solved rather than management for the sake of management (under the facade of not loosing value not committed), you keep things as they are.

Not the answer you're looking for? Browse other questions tagged or ask your own question.