Compare different files, merge specific files git integration


Git support comes in handy in intellij Idea very often. But there are two features which bother me :
Is there a way to compare different file with git? For example when moving package I tryed to compare file from other remote branch in other package but without succes
Is there a way to merge specific folders or files from different branches?

Comment actions Permalink

Try the following:
* right click on a file or folder, select Git | Compare with Branch, select branch.
* Click to the branch indicator at the right in the status bar (or invoke VCS | Git | Branches from the main menu), select a branch, select "Compare" for diff, or "Merge" for merging that branch.
* There is also VCS | Git | "Merge changes" which is also capable to merge branches.

Comment actions Permalink

It showing "File doesn't exist in branch File

doesn't exist in branch ...". As I sad here was changes and this file in other package in other branch. It possible to do with git difftool.
Second question has some workaraounds outside intillij idea like .
Comment actions Permalink

What does Git return in the command line for the following query?
    git show <branch>:<relative path>
(change <branch> to the branch you need to compare with; change <relative path> to the relative path to the file).


Please sign in to leave a comment.