There is something wrong with the idea that git gives you confidence to delete.
As so often this is from the perspective of the individual programmer.
Sure, you can delete your code and you can retreive it. Well done you, but you are relying on your memory.
Unlike mere programmers Developers are fully interchangeable members of a multi-decade team.
Tombstones
In the world of online publishing there is a concept of a 'tombstone' which is located at the URL of a retracted paper or any other entity removed for a reason. There are similar usages in programming.
A Book of Remembrance as a collection of Tombstones
My grandfather's ashes were, I believe, scattered at sea, but as a child I was impressed that he still had an entry in the Book of Remembrance at the Crematorium, which gave us a place to visit, and as my unsentimental Grandmother might have said, took up a lot less room.
Now these remebrances are virtual.
Gone but Not Forgotten
Even after using git for a long time Developers still do not delete modules, files or even lines of code. They comment them out, or just leave them in place, holding an enormous amount of context in their heads.
Let's not criticise them, lets take their concern seriously. They want to be able to find things themselves and for future Developers to know what was useful, even if it is not currently required.
REMEMBRANCE.md
At the top of every repository there HAS to be a README.md (or you get nagged by github); similarly we should add a REMEMBRANCE.md which takes the following form:
| File | Date | Description and Reason for Deletion |
|---------------------|:----------:|:-------------------------------------------------------------|
| maven-tomcat-plugin | 2013-11-11 | An embedded Tomcat, for testing. The team just walked away |
| my-perl-script.pl | 2019-03-23 | A script to remove stones from horses hooves. Moving on up. |
| tpp-module | 2024-02-22 | Finished polishing, flushing now. |
Lest We Forget
Example REMEMBRANCE.md
File | Date | Description and Reason for Deletion |
maven-xxx-plugin | 2013-11-11 | An embedded Tomcat, for testing. The team just walked away |
my-perl-script.pl | 2019-03-23 | A script to remove stones from horses hooves. Moving on up. |
tpp-module | 2024-02-22 | Finished polishing, flushing now. |
This simple practice will give Developers the confidence to delete and unleash the promise of clean projects that git offers.
PS Spelling
It is Remembrance, not Rememberance, I looked it up, though I prefer Rememberance.