The developer quickly finds the commit that introduced the bug and is able to act accordingly. Because the git history is clean, git bisect has a refined set of commits to compare when looking for the regression.The developer can not identify when the bug was introduced using git log so the developer executes a git bisect.A developer examines the history of the main branch using git log because of the "clean history" the developer is quickly able to reason about the history of the project.A feature that was working successfully is now broken. A bug is identified in the main branch.Why do we want to maintain a "clean history"? The benefits of having a clean history become tangible when performing Git operations to investigate the introduction of a regression. This gives the later benefit of a clean merge of your feature branch back into the main branch. You want to get the latest updates to the main branch in your feature branch, but you want to keep your branch's history clean so it appears as if you've been working off the latest main branch. For example, consider a situation where the main branch has progressed since you started working on a feature branch. The primary reason for rebasing is to maintain a linear project history. It's very important to understand that even though the branch looks the same, it's composed of entirely new commits. Internally, Git accomplishes this by creating new commits and applying them to the specified base. The general process can be visualized as the following:įrom a content perspective, rebasing is changing the base of your branch from one commit to another making it appear as if you'd created your branch from a different commit. Rebasing is most useful and easily visualized in the context of a feature branching workflow. Rebasing is the process of moving or combining a sequence of commits to a new base commit.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |