aidlobi.blogg.se

Sublime merge rebase
Sublime merge rebase









sublime merge rebase sublime merge rebase

While the accepted and most upvoted answer is great, I additionally find it useful trying to explain the difference only by words: ( Disclaimer: I'm the author of the "10 things I hate about Git" post referred to in another answer)

#Sublime merge rebase code#

If you rebased your code onto master instead of merging it, it would look like this: Write tutorialĪll of your commits are at the top (newest), followed by the rest of the master branch. That is, merges and UI commits in the middle of your documentation commits. Merge remote-tracking branch 'origin/master' into fixdocs Without rebase, your history might look something like: Write tutorial Let's say other people on your project are working on the user interface, and you're writing documentation. I'll try explaining this with a just-words example. I seem to recall having read blog posts from programmers who only use rebase and others that never use rebase. So if you want a "clean history", you need to use rebase. Some people find this messy or undesirable.įor reasons I don't understand, GUI tools for Git have never made much of an effort to present merge histories more cleanly, abstracting out the individual merges. If you do this again later with more changes, you begin to create an interleaved thread of histories: some of their changes, some of my changes, some of their changes. When you merge their branch into your branch, you tie the two branch histories together at this point.You can repeat this process again when there are new changes on their branch, and you will always end up with a clean set of changes "on the tip" of their branch. That makes a clean, conceptually simple package of changes that someone can review. When you rebase your branch onto their branch, you tell Git to make it look as though you checked out their branch cleanly, then did all your work starting from there.(They generally point towards the "parent" of each commit, which ends up being backwards in time, which is weird). Personally I don't find the standard diagramming technique very helpful - the arrows always seem to point the wrong way for me.











Sublime merge rebase