![]() Simply select one or more commits, then use the context menu to squash, reorder, drop, amend commit message, etc. Interactive rebase commands are performed individually, and this works out to be very intuitive from a GUI. (Sourcetree can do this, but its unreliable and usually doesn’t give the correct result) The entire interface is consistent and elegant.Ĭtrl+ Click any two commits to see a diff of them. Please also head over to their website and read the feature highlights. Sublime Merge is a great tool and its features helped me learn git and made my workflow faster.īelow I’ve explained each awesome feature, followed by a comparison with SourceTree. After switching to Sublime Merge my knowledge of git exploded and it has been a great discovery process. I have used Sourcetree for over a year and during that time I was still learning git. Sometimes when you click on a branch it doesn’t jump to it in the graph view. ![]() Regularly prompts for authentication for each repo separately (very frustrating). Regularly complains about corrupt dictionaries and asks if I want to delete them. Regularly crashes and needs to be reinstalled (or requires a reboot), usually just after updating Microsoft Office. Note: my experience is with the Windows versions of Sublime Merge and Sourcetree. ![]() I hope my comments help to further improve both tools. The main point of this article is to point out the amazing features in Sublime Merge, and to illustrate why you should avoid using Sourcetree. You do not have any commits in your history, but it now gives youĪn empty index (to match non-existent commit you are not even on).Sublime Merge vs SourceTree (Git client comparison) "git reset" (without options or parameters) used to error out when This was changed in Git 1.8.2, though, so in modern versions of Git you can use the commands above even prior to making your first commit: In old versions of Git, the above commands are equivalent to git reset HEAD and git reset HEAD respectively, and will fail if HEAD is undefined (because you haven't yet made any commits in your repository) or ambiguous (because you created a branch called HEAD, which is a stupid thing that you shouldn't do). This can come in handy when there are too many files to be listed one by one in a reasonable amount of time. Without any file name to unstage all due changes. Which will remove it from the current index (the "about to be committed" list) without changing anything else. You can undo git add before commit with git reset If you want to get changes from LOCAL :diffg LO If you want to get changes from BASE :diffg BA If you want to get changes from REMOTE :diffg RE You could edit the MERGED view the following way More information about vimdiff navigation is here and here. You can directly reach MERGED view using ctrl+ w followed by j. You can navigate among these views using ctrl+ w. MERGED – merge result, this is what gets saved in the repo REMOTE – file you are merging into your branch LOCAL – this is file from the current branchīASE – common ancestor, how file looked before both changes Step 2: Run following command in terminal git mergetool This will set vimdiff as the default merge tool. Step 1: Run following commands in your terminal git config merge.tool vimdiff Kdiff3, tkdiff, xxdiff, tortoisemerge, gvimdiff, diffuse,Įcmerge, p4merge, araxis, vimdiff, emerge.īelow is the sample procedure to use vimdiff for resolve merge conflicts. One of the following tools to use it instead: meld, opendiff, Running git mergetool for me resulted in vimdiff being used. It is much better than doing the whole thing by hand certainly.ĭoesn't necessarily open a GUI unless you install one. ![]() Sometimes it requires a bit of hand editing afterwards, but usually it's enough by itself. It opens a GUI that steps you through each conflict, and you get to choose how to merge.
0 Comments
Leave a Reply. |