How do I manage code in source control?

We have a team of several developers working on the same web application, sometimes in the same file for different functions. Therefore, it is very difficult to manage the code.

Although we use subversion to commit our changes, when it comes to deploying either in staging or production, it becomes a very daunting task for every task. Each developer should be mindful of their changes to the file, along with each line changed in that file for specific functionality.

Suppose we have a file A

with 2 developers working at the same time. Developer 1

made some changes for functionality 1

and committed it, Developer 2

made some changes for functionality 2

and committed it. Now Developer 1

goes in senior

to deploy the deployment and tells him about every line he changed and the same process repeats Developer 2

. Now Developer 1

made some changes to the same file for functionality 3

and repeated it again and it is sent to the senior to deploy the deployment and repeats the same process again.

Then the requirement arises that functionality 3

, developed Developer 1

, must be deployed in production. So he asks his senior to deploy it to production. Now the problem arises. Many days have passed since he wrote the code for functionality 1

, and the file A

has the code for 3 functions developed by 2 developers. Therefore, Developer 1

it is necessary to memorize each line of code exactly functionality 1

so that he can tell the elder about it.

His senior compares the staging and production code and translates each line of code into production.

This process is time consuming and a manual process, which increases the likelihood of failure.

How can this problem be solved? Please guide.

+3


source to share


1 answer


With GIT, In this case, I think every developer should be working on a different branch.

Then, when they are done doing their job, they commit and create a merge request.



The senior will receive the merge request and review the work done on the development branch. He will accept the line or not.

If he agrees, he will "merge" the code into master.

0


source







All Articles