vscode-gitlens icon indicating copy to clipboard operation
vscode-gitlens copied to clipboard

Stash line chunks of a altered file

Open dnsampaio opened this issue 6 years ago • 5 comments

Hi, would it be possible to add a stash change button over the inline-changes view? Just as stage change, I would like to stash single changes in a file. For example, if in one file we have changes in lines [0 - 3], [20-30], [90-100]. I would like to select to stash just the [20-30] chunk.

Regards Diogo

dnsampaio avatar Feb 28 '19 11:02 dnsampaio

@dnsampaio do you mean stage rather than stash?

eamodio avatar Mar 08 '19 22:03 eamodio

@eamodio I think stashing specific ranges, git stash -p.

I'm in need of a similar utility myself, would you consider adding such a functionality to gitlens?

enricopolanski avatar Jul 10 '19 16:07 enricopolanski

This isn't something that I will likely add myself, but if the community wants to provide a PR I'm certainly open to it -- depending on the complexity and scope of the changes required.

eamodio avatar Mar 30 '20 07:03 eamodio

@dnsampaio do you mean stage rather than stash?

No, I really want to stash partial changes of a file. Such functionality does not exist directly in git. What I need to do is to stage all other changes I don't want stashed, commit, stash the file, reset the commit.

dnsampaio avatar Apr 05 '24 07:04 dnsampaio

This would be very useful

grass29 avatar Aug 13 '24 10:08 grass29