![]() ![]() The man page gitworkflows(7) presents several branching disciplines that may be directly useful, or give you ideas on how to structure your own projects in other ways. Product development continues, but you may need to apply bug fixes or new features to that version even after youâve released 2.0, for customers who are still using the older version the 1.0 branch allows you to do that (and git cherry-pick is particularly useful in this case see git cherry-pick). When you release version 1.0 of your product, it gets its own branch. ![]() When the feature is ready, you do the opposite: merge the feature branch into master, adding the new code to the main version of the project.Īnother use for multiple branches is to continue maintenance on older versions of software. Periodically, you merge master into your feature branch, so youâre working on up-to-date code and notice and resolve any conflicts. You work on the feature branch while developing that feature, and switch to the master branch to work on the main project (which does not yet contain the new feature code). Branches allow different versions of the same content to evolve independently at the same time, while you periodically recombine the contributions from different branches in a process called âmerging.â When you switch from one branch to another, Git updates your working tree to reflect the state of the repository content in the tip commit of the new branch.Ī typical use for a branch is to work on a new software feature in isolation, without adding it to the main line of development of the project these are often called âfeatureâ or âtopicâ branches. ![]() Now that you know how to create a repository and commit to a single branch, itâs time to learn about using multiple branches. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |