What Is Meant by "Long-Lived" Branches in Git?

In Git, "Long-lived" branches are intended to exist for the entire duration of the project, and represent significant milestones or releases in the project's development. They are an important part of Git workflows, as they provide a stable foundation (or base) for the project that other work can be built on top of.

Long-lived branches, such as "master" or "develop", are typically considered the primary branches in a project's history, and serve as the foundation for the project.

All other branches in the project are typically created from a long-lived branch, and serve as temporary lines of development that is merged back into the long-lived branch once the work on that branch is complete.

By using a long-lived branch as the foundation for a project's history, developers can ensure that the project's development is well-organized, and that changes to the project are made in a controlled and structured manner. Long-lived branches also serve as a reference point for other branches, making it easier to understand how different lines of development fit into the overall history of the project.


This post was published by Daniyal Hamid. Daniyal currently works as the Head of Engineering in Germany and has 20+ years of experience in software engineering, design and marketing. Please show your love and support by sharing this post.