The successful codeline process
Tags: codeline, git, beginners, productivity
Published: 2022-05-17 17:21:59

## Introduction 

A friend of mine asked me on one of the meetup, how frequently we are releasing the features on production. I said 3 week once. ie. every end of sprint 😊

He was surprised and asked me how many people working on the product, I said it was 14, all the 14 will code  👨‍💻
 
 Then my friend surprisingly asked how are we managing code conflicts ⌛ as many developer working on same codeline with different multiple features , bugfix

oh Yeah... In this blog post I will share you the most successful ⭐ codeline strategy we using for past 4 years. 

This will be useful for people managing multiple repositories 🤝, And also for new product development ☑️. 

## Git Codeline process

_a picture is worth a thousand words_

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5gx3roybnxtxrz42mbod.png)
 

- ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gcx67sjum5sfzt74rfo4.png) 

 **develop** holds all completed feature branches and reflects the latest development code. Continuous builds run on this branch.



- ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zxnna5sg4dvfj9tls4fe.png)
 
 
**main** - only **stable code** is merged from the develop branch. Nightly / Publish builds run on this branch.

- ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5tgqfvdo6csed0mstedx.png)
 
 
 **release/*** branches - branched out of the **main** branch, for every release. _Tagged_ for each release.

- ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7wmaf6icjv0k8cwsp3hi.png)

Pull Request denied, if PR-Merge-build fails

- **feature/* branches** - branched out of the develop branch. usually **short-living** - when a feature is ready it is merged back to develop and the branch is closed.

- ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wgipq8c3jaqmxmq1yx3v.png)

manual pull should be fetched/refreshed to consecutive feature branch

- ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3ui31b5rf3yhutt4q9v5.png)

Will run on develop branch, so that each developer commit is responsible for success/failure

- ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6ikgp9ug8wna9tc8h6bx.png)
   
 Pull Request Merge build will certify before integrate into main or release branch. This process involves merging the source branch i.e. **develop** or **hotfix** branch, into the target branch i.e **main** or **release** branch, with out committing into main 

- ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/03fld1q0nxiirmd2imyi.png)

**E2E test** will runs on main branch. Any failure should be treat as  **blocker**. 

- ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bejch98l7ijydetfzpin.png)

E2E test will runs on release branch. Any failure should be treat as  blocker. 
 


## Advantages 

   - Developer will always work on successful builds⌛
   - No ~~conflicts~~.
   - Merge will be reviewed 👁️‍🗨️ by peers
   - Saves more time 🕒