How to get my git-integrated kaleidoscope to display all the files that need to be committed?

I use the git command line and Kaleidoscope to run my code reviews. When I merge a branch into another and type

git difftool 

The kaleidoscope displays only those changes that are “not set for fixation” and that do not display “unconnected paths” or “changed for fixation”.

The rest of the material is displayed on the command line.

Any idea why?

This is my ~ / .gitconfig file

 [user] name = Dirty Henry email = dirty@henry.com [core] excludesfile = /Users/dirty/.gitignore_global editor = mate [difftool "Kaleidoscope"] cmd = ksdiff-wrapper git \"$LOCAL\" \"$REMOTE\" [mergetool "sourcetree"] cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\" trustExitCode = true [diff] tool = Kaleidoscope [credential] helper = osxkeychain [difftool] prompt = false 
+6
source share
2 answers

Short answer: what you want to enter on the command line is git difftool HEAD , not git difftool .

Long answer: this is normal git behavior, and it is frustrating if you do not understand what is going on. I am not sure why the command line diff works as you expect, but both git diff and git difftool should run the same way as on the git page:

git diff [--options] [-] [<path> ...] This form is for viewing the changes you have made to the index (an intermediate area for the next commit). In other words, differences are what you could say git to add to the index, but you still haven't. You can change using git-add (1).

So, git diff and git difftool should only show unstated changes.

If you want to see the changes made, you should use git diff --cached and git difftool --cached instead:

git diff [--options] --cached [<commit>] [-] [<path> ...] This form is for viewing the changes that you made for the next commit with respect to the name <commit>. Typically, you want to compare with the last commit, so if you do not give <commit>, then HEAD is used by default. If HEAD does not exist (for example, unborn branches) and <commit> is not specified, it shows all phased changes. --staged is synonymous with --cached.

Finally, if you want to see both phased and non-stationary changes , you use the third form, git diff HEAD or git difftool HEAD :

git diff [--options] <commit> [-] [<path> ...] This form is designed to view the changes that you have in the working tree regarding the name <& commit ;. GT You can use HEAD to compare with the last commit, or the name of a branch to compare with the tip of another branch.

+14
source
 git difftool --staged 

Gives you just that.

staged is synonymous with cached in this case, although I find staged easier to remember.

+1
source

Source: https://habr.com/ru/post/921865/


All Articles