I have a git repository with different tags/commits and I want to replace a Makefile (it is different in each version).
In all these versions with my own Makefile.
Is it possible to write only one patch-file that can be applied to all of these commits/tags that will "delete" the individual Makefile and "insert" mine?
The simple answer is not.
Why can't you?
If you wish to update multiple commits you have to update them each one separately due to the way in which git store the date (too long to explain here how)
What can you do?
You can write a script to do it.
The script should look something like:
Note:
You can use
--tree-filter
and--index-filter
withgit filter-branch
.--index-filter
is faster and will update your index file