![]() Allows us to see a graph of when branches were made using git log -oneline -graph which can help understanding why changes were made and when.Most descriptive and verbose history, tells us exactly when things happened, helps give the best context about code changes.It will also create a merge commit, a special type of “empty” commit that indicates when the merge occurred Merge Types MergeĪ standard merge will take each commit in the branch being merged and add them to the history of the base branch based on the timestamp of when they were created. The base branch has had changes made since the new branch was made: 3,4,5. The branch being merged was created at commit 2, so contains commits 1,2,A,B,C We have 2 branches, the base branch where the merge is going into (e.g: main, or release) and the branch being merged. Here's what we'll use as our sample Git repository. ![]() It doesn't help that the names don't give too much insight without prior knowledge of git terminology.įirstly it's it's important to note that all of these have their own advantages and disadvantages, it’s more about what best suits the team and their current needs rather than any absolute best option.īelow is a breakdown of what each type does, along with diagrams to help explain the process of each for clarity. ![]() They can be confusing for those new to Git and it's often tricky to work out which the "correct" option is at any given time. ![]() I was recently asked what the difference was between the 4 merging options presented to you on GitHub when finishing a PR, namely: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |