DEV Community

Discussion on: How do you make it easier to search through version control for deleted code?

Collapse
 
razoxane profile image
Jade Edward

On deleting code in a single file, I agree with the other commenter about good commit messages (git add -p is your friend!).

For entirely deleted files, I use GitFlow, and as part of my release notes, I use a script that compares master to the release branch to get a list of added, modified, and deleted files, and the last known blob commit hash URL for those files, then include that in the change log and/or release notes.

Makes it really easy to find when a specific file was deleted, as finding removed files can be challenging in both CLI git and in Github if they are no longer in the codebase, or have been renamed.