![]() ![]() ![]() Squash merging condenses the history of changes in your default branch, so it's important to work with your team to decide when you should squash merge or when you want to keep the full commit history of a topic branch. You can step through this history to find out exactly when work was done. The commit history of a main branch updated with squash merges has one commit for each merged branch. Contributors to the topic branch work how they want in the topic branch, and the default branches keep a linear history through the use of squash merges. Squash merging keeps your default branch histories clean and easy to follow without demanding any workflow changes on your team. Furthermore it is recommended to delete the topic branch to prevent any confusion.Ī simple way to think about this is that squash merge gives you just the file changes, and a regular merge gives you the file changes and the commit history. Squash merge commit doesn't have a reference to the topic branch, it will produce a new commit, that contains all changes from the topic branch. Instead of each commit on the topic branch being added to the history of the default branch, a squash merge adds all the file changes to a single new commit on the default branch. Squash merging is a merge option that allows you to condense the Git history of topic branches when you complete a pull request. The default branch is an accurate representation of the history of each topic branch, but it's difficult to use to answer broader questions about your project's development. As a project grows larger, the number of topic branches worked on at the same time increases, making the default branch history increasingly harder to follow. The commit history on your main branch (or other default branch) doesn't follow a straight line, because of the related topic branch history. ![]() The comments and discussion in the pull request give additional context for the changes made in the topic branch. This merge adds the commits of the topic branch to your main branch and creates a merge commit to reconcile any conflicts between the default and topic branch. When you complete a pull request, you merge the topic branch into your default branch, usually main. Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server 2019 | TFS 2018 ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |