Replies: 1 comment
-
You'd have to use a --commit-callback, and add an extra FileChange for the deletion of the file in question. It'd look something like this: git filter-repo --refs HEAD~5.. --commit-callback "commit.file_changes += [ Technically, my command is trying to delete PATH/TO/FILENAME from every commit in the range |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
It took me a while to realize that my attempts to delete a file from a specified range of
--refs
was not working because the file was created earlier. Example command:This deletes FILE only if FILE was created in the last 5 commits. If the file was created in HEAD~6, git-filter-repo happily processes all of the last 5 commits without any notification that FILE was not deleted. I don't know if this should be a bug report or if this is intended behavior.
My question is, how do I go about deleting FILE from the range HEAD~5..HEAD if FILE was created in HEAD~6 or earlier?
Beta Was this translation helpful? Give feedback.
All reactions