Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

lkraav 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

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 Leaders.
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 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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events