It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Stage hunks

v, Windows 10 x64

I can't figure out how to use SourceTree anymore.

Staging hunks and then commiting is commiting the entire file.

I thought at first that I had accidently staged too much.

But this is repeatable.

Seems to be in either File Status view or Log/History view.

Once, after I staged a hunk, the staged and unstaged sections worked as expected. When I click on a file in unstaged, I see only those hunks that have NOT been staged. Click on a file in staged, I see only those hunks that HAVE been staged. But then click commit, review the file and all hunks are there.

Commit and all hunks are commited.

Later, the behavior changed.

After staging hunks, clicking on a file in both the staged and unstaged sections showed exactly the same hunks. I could not distinguish between staged and unstaged hunks.

The only workaround I could find was to discard all the hunks I wanted to keep, commit the rest, then in the IDE save the file to disk to get the dscarded hunks back.

1 answer

0 votes
Ana Retamal Atlassian Team May 18, 2017

Hi! We've followed your steps but haven't been able to reproduce this behaviour. Please let us know which version of Git or Mercurial are you using, and tell us more about your staging so we can try to replicate this issue.

Best regards,


Here is one issue.

The rest will have to wait until I have legitimate changes to commit.

Select FlowControl.UnitTest.
2 hunks show changes.

Show pending changes in two hunks

Stage the second hunk.
Select FlowControl.UnitTest from the unstaged list.
Correctly shows only the first hunk.

Show remaining pending changes

Select the file under FlowControl.UnitTest from the staged list.
Correctly shows only the second hunk.

Show hunks from staged list

Select the FlowControl.UnitTest folder from the staged list.
Incorrectly shows only the first hunk, which was NOT staged.

Should show staged hunk


I don't kow the git version, but it is hosted at

minnsey Atlassian Team May 31, 2017

Thank you for the extra detail.

It looks like you've found a bug in the TreeView, when selecting a Folder it is giving the wrong diff, while selecting the files shows the correct diff.

Please follow: for updates.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Sourcetree

Sourcetree for Windows - CVE-2019-11582 - Remote Code Execution vulnerability

A vulnerability has been published today in regards to Sourcetree for Windows.  The goal of this article is to give you a summary of information we have gathered from Atlassian Community as a st...

4,910 views 0 12
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you