39

I want to commit my works. But when I want to see what I changed and wrote them into commit message, I saw some of my changes won't show.

What is the problem?

Alberto Monteiro
  • 5,989
  • 2
  • 28
  • 40
Al00X
  • 1,492
  • 1
  • 12
  • 17
  • It's possible to get tricked by submodules if you are using them. Let's imagine we have repositories "foo" and "bar". Repository foo contains bar as a submodule. You can now open bar directly or as foo's submodule. Both tabs will be titled "bar". You can determine if you are in a submodule by clicking any file in any commit, choosing "show in explorer" and looking at the path. – jumxozizi Aug 01 '18 at 14:06

8 Answers8

76

Change The Maximum Lines And Size In Options

Tools > Options > Diff

Change Max Diff Line Count And Change Size Limit (Text)

Rajneesh071
  • 30,846
  • 15
  • 61
  • 74
Al00X
  • 1,492
  • 1
  • 12
  • 17
  • 2
    Is possible an unlimited diff? – Dani Sep 02 '17 at 18:44
  • 4
    I've done exactly this, and the Diff still shows a maximum of 100 lines. applies both in the commit screen, the Log/History screen, and the Log window for that specific file. This makes it extremely difficult to track changes in files that are only a few hundred lines over a long period. I've set my line maximum to 1,000 and the size limit to 10,000, so this problem shouldn't be happening. – user3685427 Nov 18 '17 at 21:43
  • 6
    This does work, but it was necessary for me to close Sourcetree and relaunch it for the change to take effect. – aaronsti Mar 24 '20 at 23:55
  • 1
    @aaronsti I thought it wasn't working, but you're right if you relaunch it after the changes it works! – Alex W May 26 '20 at 00:04
  • No reboot necessary in v3.4.12. I wish I could upvote this twice, your answer almost a decade ago saved me from a very painful night – Patrick Moore Apr 04 '23 at 01:32
12

I'm adding this answer as another possible cause of SourceTree "only showing the change history for a single file". This was annoying me for quite a while. No settings changes would display more than one file. THEN, I realised that the commit summary is actually a panel which slides up over the file list. ZOMG.

ZOMG

slipperyseal
  • 2,728
  • 1
  • 13
  • 15
  • Thanks, this got me too. You have to hover the mouse at the top of the commit summary to see the splitter. Also in my SourceTree v2.2.4 it looks a bit different to your screenshot as the file list has two columns and you can still see the Filename/Path column headers while the commit summary is covering the actual file list. – Glenn Lawrence Dec 03 '19 at 05:51
9

Make sure your filter is setup correctly:

For me the filter bugged out and while the main text said "Pending files", the dropdown had nothing selected.

Yani
  • 424
  • 6
  • 13
1

Another possible reason:

Make sure Ignore whitespace in the diff view is not enabled.

Jan Rüegg
  • 9,587
  • 8
  • 63
  • 105
1

Size Update For the latest ScourceTree

ScourceTree -> Preferences -> Diff -> Size limit(text)
Rajneesh071
  • 30,846
  • 15
  • 61
  • 74
0
  1. Make sure that you copy the last version of your project, the one that you want to commit, to the directory of your repositories that you set for SourceTree. Replace the old project with the new one then open SourceTree
  2. Open SourceTree, click commit, select all the files that you want to commit, which will probably be all the files you see (becuase SourceTree shows the changed files after you click commit).
  3. On the Puush button on the top you'll se a red notification icon which means that you didn't push the last commit. Once you do that, your changes must be visible on BitBucket and SourceTree
Ahmed Anwar
  • 688
  • 5
  • 25
0

If it is not a Pending issue or an options issue mentioned above, make sure Mercurial wasn't inadvertently checked if you're using it with Git. It will manifest in a similar way. If so, you're going to need to deinstall & re-install.

0

Even though I have changed the size limit for the txt file, SourceTree still would not show diff for package-lock.json. Instead it shows "Modified binary file, diff suppressed". I was confused and looked for the possible answer for that, e.g. Why does Git treat this text file as a binary file?

package-lock.json

Then I found there is another setting "Ignore File pattern"! After I remove *lock pattern, SoureTree finally show the change for package-lock.json

ignore lock file

Qiulang
  • 10,295
  • 11
  • 80
  • 129