You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am attempting to remove a commit from my repository history based on its message or filename by using commit.skip() . However, it seems that once the conditional statement evaluates to true, all subsequent commits in the history are skipped, irrespective of the condition.
The code I have been using to skip a commit based on its filename is the following:
git filter-repo --commit-callback
for change in commit.file_changes:
if b"index" in change.filename:
commit.skip()
whereas for skip a commit based on its message content is the following:
git filter-repo --commit-callback
if b"index" in commit.message:
commit.skip()
The logic of the conditionals is correct, as when I use
git filter-repo --commit-callback
if b"index" in commit.message:
commit.message = b"new commit message"
it works perfectly fine, affecting only the commits which respect the conditional statement.
I have not found any indication on how the skip() works in the git filter-repo documentation.
The text was updated successfully, but these errors were encountered:
I am attempting to remove a commit from my repository history based on its message or filename by using
commit.skip()
. However, it seems that once the conditional statement evaluates to true, all subsequent commits in the history are skipped, irrespective of the condition.The code I have been using to skip a commit based on its filename is the following:
whereas for skip a commit based on its message content is the following:
The logic of the conditionals is correct, as when I use
it works perfectly fine, affecting only the commits which respect the conditional statement.
I have not found any indication on how the
skip()
works in the git filter-repo documentation.The text was updated successfully, but these errors were encountered: