git visual diff between branches

前端 未结 16 1942
独厮守ぢ
独厮守ぢ 2020-12-12 08:35

This answer is great for seeing a visual diff between two files that are checked into git: How do I view 'git diff' output with a visual diff program?

Howev

相关标签:
16条回答
  • 2020-12-12 09:10

    You can also do this easily with gitk.

    > gitk branch1 branch2
    

    First click on the tip of branch1. Now right-click on the tip of branch2 and select Diff this->selected.

    0 讨论(0)
  • 2020-12-12 09:10

    UPDATE

    Mac: I now use SourceTree. Thoroughly recommended. I especially like the way you can stage / unstage hunks.

    Linux: I've had success with:

    • smartgit
    • GitKraken
    • meld

    E.g. to install smartgit on Ubuntu:

    • download the .deb from https://www.syntevo.com/smartgit/download/
    • install with sudo dpkg -i /path/to/deb`

    This does the job:

    git-diffall with a GUI diff tool like meld. See point 5 here:

    http://rubyglazed.com/post/15772234418/git-ify-your-command-line

    There's a nice post about git and meld here: http://nathanhoad.net/how-to-meld-for-git-diffs-in-ubuntu-hardy

    0 讨论(0)
  • 2020-12-12 09:11

    In GitExtensions you can select both branches in revision grid with Ctrl pressed. Then you can see files that differ between those branches. When you select a file you will see diff for it.

    Taken from here

    0 讨论(0)
  • 2020-12-12 09:12

    For those of you on Windows using TortoiseGit, you can get a somewhat visual comparison through this rather obscure feature:

    1. Navigate to the folder you want to compare
    2. Hold down shift and right-click it
    3. Go to TortoiseGit -> Browse Reference
    4. Use ctrl to select two branches to compare
    5. Right-click your selection and click "Compare selected refs"

    Source: http://wikgren.fi/compare-diff-branches-in-tortoise-git-or-how-to-preview-changes-before-doing-a-merge/

    0 讨论(0)
  • 2020-12-12 09:13

    If you use Eclipse you can visually compare your current branch on the workspace with another tag/branch:

    Eclipse workspace compare

    0 讨论(0)
  • 2020-12-12 09:14

    In case you are using Intellij Idea IDE, you could just use the compare option in the branch.

    enter image description here

    0 讨论(0)
提交回复
热议问题