gitkraken / vscode-gitlens

Supercharge Git inside VS Code and unlock untapped knowledge within each repository — Visualize code authorship at a glance via Git blame annotations and CodeLens, seamlessly navigate and explore Git repositories, gain valuable insights via rich visualizations and powerful comparison commands, and so much more
http://gitkraken.com/gitlens
Other
9.02k stars 1.34k forks source link

Stash line chunks of a altered file #674

Open dnsampaio opened 5 years ago

dnsampaio commented 5 years ago

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

eamodio commented 5 years ago

@dnsampaio do you mean stage rather than stash?

enricopolanski commented 5 years ago

@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?

eamodio commented 4 years ago

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.

dnsampaio commented 7 months ago

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

grass29 commented 3 months ago

This would be very useful