Created
December 4, 2018 12:23
-
-
Save gatamar/34d17fc66ea07660ee0e9ff0c9852d51 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from subprocess import call | |
# git diff --name-only --diff-filter=D > deleted_files_list.txt | |
folder_name = "SubFolder1/SubFolder2" | |
with open("deleted_files_list.txt") as f: | |
for filename in f: | |
if filename.startswith("folder_name"): | |
call(["git", "checkout", filename[:-1]]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment