The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

"Stage selected lines" disabled for new files, but no "intent-to-add" available by default?

lkraav
Contributor
April 14, 2013

Hi

I would like to stage only parts of a new file. "Stage selected lines" is disabled in right-click menu, but for a new file Stage Hunk == Stage File and it isn't what I want.

There's no "intent-to-add" command by default. Is "Custom Actions" the way to go here or what is the SourceTree-based process supposed to look like for this?

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
April 14, 2013

You basically have to add the entire new file to the index first, then select the lines you *don't* want to be in the first commit of this file and click Unstage Selected Lines.

lkraav
Contributor
May 29, 2014

Thanks, I'll try this at next opportunity

Ken
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 25, 2015

This doesn't seem to work, at least as of SourceTree 2.0.5.2. I can add an untracked file to the index, but even when I select specific lines from it, SourceTree only shows the button to allow me to un-stage the entire file.

Like haurimton_mafr likes this
TAGS
AUG Leaders

Atlassian Community Events