jupyterlab-git icon indicating copy to clipboard operation
jupyterlab-git copied to clipboard

Stage part of file as with `git add --patch`

Open joelostblom opened this issue 2 years ago • 4 comments

Is your feature request related to a problem? Please describe.

It is often helpful to be able to stage parts of a file, as this gives more control over what is committed and encourages both atomic commits and review of what is being staged.

Describe the solution you'd like

A panel where you can click the lines you want to stage/unstage. Similar to what other git gui tools such as Sourcetree, GitKraken, and RStudio do:

image

Describe alternatives you've considered

I personally use the terminal, but this would be very helpful when teaching how to use git in jupyterlab

Additional context

  • Python package version: 3.10.4

  • Extension version: 0.36

  • Git version: 2.34.1

  • Operating System and its version: "Pop!_OS 22.04 LTS"

joelostblom avatar Oct 03 '22 16:10 joelostblom

This would really be helpful to only push some parts of the notebook files, and keep others i.e. meta-data or output as it is.

How do you avoid this big amount of noise in gut currently?

jankap avatar May 08 '23 12:05 jankap

This is community driven extension, new contributions are always welcomed if you want to give a try @jankap

fcollonval avatar May 09 '23 09:05 fcollonval

This is community driven extension, new contributions are always welcomed if you want to give a try @jankap

Sure, got it and rephrased my harsh comment, sorry. I really ask myself how people currently avoid noise in git.

However I was surprised that this feature even does not seem to exist in VSCode, so it seems to be more complex than expected.

jankap avatar May 09 '23 10:05 jankap

This would be an awesome feature indeed! Unfortunately I cannot code in Javascript nor Typescript so I won't be able to contribute...

However I was surprised that this feature even does not seem to exist in VSCode, so it seems to be more complex than expected.

This feature now exists in VSCode :)

GorgiAstro avatar May 02 '24 09:05 GorgiAstro