Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git history for a selected file #864

Closed
adammclaurin opened this issue Jan 29, 2021 · 4 comments · Fixed by #980
Closed

Git history for a selected file #864

adammclaurin opened this issue Jan 29, 2021 · 4 comments · Fixed by #980

Comments

@adammclaurin
Copy link

It's no secret that using GitHub directly isn't great for viewing changes to Jupyter notebooks. jupyterlab-git offers some promise to make that better via integration with nbdime, but unfortunately it only seems to work by going through the history of the whole repo, which might have many changes unrelated to the file you're interested in. It'd be amazing to have a way to select a particular file to explore the history for just that one file, again with nbdime integration to be able to see the diffs clearly.

@tcapelle
Copy link

tcapelle commented Feb 1, 2021

For github, you can use the NBReview app, it makes pull requests so much easier.

@ianhi
Copy link
Collaborator

ianhi commented Feb 22, 2021

For future reference the git command for this is:

git log --follow -p -- path-to-file

(see https://stackoverflow.com/a/5493663/835607)

So this will require:

  1. Enabling that log command in the backend
  2. Figuring out a good UI on the frontend.

@fcollonval
Copy link
Member

Thanks @ianhi for the pointer

2\. Figuring out a good UI on the frontend.

While avoiding components multiplication 😉

@adammclaurin
Copy link
Author

If we do implement this feature, it'd be amazing to be able to optionally ignore changes to output cells when diff'ing Jupyter notebooks.

navn-r added a commit to MLH-Fellowship/jupyterlab-git that referenced this issue Jul 13, 2021
navn-r added a commit to MLH-Fellowship/jupyterlab-git that referenced this issue Jul 20, 2021
navn-r added a commit to MLH-Fellowship/jupyterlab-git that referenced this issue Jul 20, 2021
navn-r added a commit to MLH-Fellowship/jupyterlab-git that referenced this issue Jul 20, 2021
navn-r added a commit to MLH-Fellowship/jupyterlab-git that referenced this issue Jul 20, 2021
navn-r added a commit to MLH-Fellowship/jupyterlab-git that referenced this issue Jul 20, 2021
navn-r added a commit to MLH-Fellowship/jupyterlab-git that referenced this issue Jul 27, 2021
navn-r added a commit to MLH-Fellowship/jupyterlab-git that referenced this issue Jul 27, 2021
navn-r added a commit to MLH-Fellowship/jupyterlab-git that referenced this issue Aug 2, 2021
navn-r added a commit to MLH-Fellowship/jupyterlab-git that referenced this issue Aug 3, 2021
fcollonval added a commit that referenced this issue Aug 3, 2021
* Add history context menu button in the file browser (#863)

* Add --follow option to Git log command (#864)

* Display Git history for selected file (#864)

* Apply suggestions from code review

Co-authored-by: Frédéric Collonval <[email protected]>

* Add styling to selected history file item

* Add selected file history for modified files

* Add 'No History Found' fallback

- Covers git-ignored files edge case

* Apply suggestions from code review

Improve readability

Co-authored-by: Frédéric Collonval <[email protected]>

* Fix tests for history (#864)

* Add single file log test (#864)

Co-authored-by: Frédéric Collonval <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants