[Python-Dev] Removing files from the repository
Serhiy Storchaka
storchaka at gmail.com
Wed Nov 29 17:22:29 EST 2017
29.11.17 20:47, Ryan Gonzalez пише:
> Doesn't Git make this rather easy, though?
>
> e.g. you can find all deleted files with:
>
> git log --diff-filter=D --summary
>
> and find a specific file with (showing glob patterns):
>
> git log --all --full-history -- **/thefile.*
>
> and then show it:
>
> git show <SHA> -- <path-to-file>
>
> or restore it:
>
> git checkout <SHA>^ -- <path-to-file>
>
> https://stackoverflow.com/questions/7203515/git-how-to-search-for-a-deleted-file-in-the-project-commit-history
Thank you Ryan. I didn't know this.
But the first command produces much noise. It includes reverted changes
that added new files (they could be reapplied again), files
Misc/NEWS.d/next/ which were merged into Misc/NEWS, and full content of
deleted directories. If the list of deleted files be supported manually,
it would contain only the root of deleted directories, and wouldn't
contain files which were not released.
More information about the Python-Dev
mailing list