Stage/Unstage selected lines

What happened with "Stage/Unstage selected lines" in the branch/commit view?

2 answers

1 accepted

2 votes
Answer accepted

When you select lines, the "stage/unstage hunk" buttons change into "stage/unstage lines". I take it the "selected" is implied.

I would have preferred separate buttons, especially since you cannot de-select lines without a CTRL+click.

Hey Roland,

I was the developer who worked on this recently, and sure enough there's a couple of bugs. I've just released 1.6.4 today which means you can actually de-select lines after you've selected them by clicking anywhere off of the diff area itself (where your source code lines are). I also plan to allow deselection when clicking on an already selected line, too.

As Seth has pointed out, we've made the buttons more context aware so it switches 'hunk' with 'lines'. This was in response to the user interface becoming too cluttered, however we're looking at improving this in the future with, perhaps, a configurable user interface.


I just updated to 1.6.4 today and I don't have Stage/Unstage Hunk/Lines buttons at all. I can't find any way to stage at any finer granularity than per-file, which is a serious step backward in terms of workflow.

So you see the diff, but you don't see the stage/unstage buttons in the top right of each hunk in the diff?

Correct. I did some more fiddling around in the UI, and it looks like, for whatever reason, the stage/unstage line/hunk buttons only show up in "Split view staging", not in "Flow staging". The update to 1.6 put me into "Flow staging" automatically - I didn't even realize there was a way to get the old split view back, which I much prefer anyway. Still, this functionality shouldn't be dependent on the view layout of the staged file listing, should it?

Hey Adrian. I think you've hit the bug where when the view is loaded for the first time it won't display the buttons. Click on another file, then click back again and it should display them. This is tracked in JIRA so I'm looking into why this could be happening. Cheers

Still no buttons after switching between selected files. I haven't found a way to get them in Flow staging, only in Split view.

Kieran, why don't you post the link to the bug so Adrian can contribute information there? Seems like there is little else the community can provide or benefit from on this.

Yup, sorry about that. I've just created one here as I couldn't find an original as it was probably in comments rather than an issue itself: Cheers

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

1,220 views 4 2
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you