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

How to discard changes to individual lines of a file? Edited

One of the main reasons I use SourceTree is the ability to commit changes to individual lines of a file, or discard those individual changes.

After upgrading to 2.6.10 on Windows 10 I can't seem to find this functionality anymore.

In the diff pane you used to be able to select multiple lines, right-click and select "Stage selected lines" or "Discard selected lines." Now right-clicking on a selected line in the diff pane just deselects the line.

Similar question from 2016, but the UI has changed since then, so the accepted answer does not apply to this version of SourceTree: https://community.atlassian.com/t5/Bitbucket-questions/What-if-you-don-t-want-to-stage-commit-part-of-the-quot-hunk/qaq-p/116026

1 answer

1 vote
minnsey Atlassian Team Oct 22, 2018

Hi

When you select 1 or more lines in the diff view the Stage HunkDiscard Hunk buttons in the upper right of the diff view should change to Stage Lines, Discard Lines

This functionality is so useful!

Suggest an answer

Log in or Sign up to answer
TAGS
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,927 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