Deleting specific git commits #22821
-
I have a repo with a file named main and in my committing history I committed several changes to it, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Most likely you’ll need to look at the file path rather than commit messages to do that, the examples for Two words of caution though:
|
Beta Was this translation helpful? Give feedback.
-
Thanks, this is very helpful |
Beta Was this translation helpful? Give feedback.
Most likely you’ll need to look at the file path rather than commit messages to do that, the examples for
git filter-branch
describe (among other things) how to remove a file from history. Alternatively, if the history isn’t too complex, you could usegit rebase
to manually edit the relevant commits.Two words of caution though: