DEV Community

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

Collapse
 
denisenepraunig profile image
Denise Nepraunig • Edited

I stumbled upon this discussion too - yeah sure we have version control - so nothing is lost - but FINDING deleted code is hard. Good commit messages help, but this is maybe not obvious.

I was thinking about some kind of a time-machine for files - so basically something like:

  • git log --follow file

  • get an overview about the changes + some "UI" or command line tool to "travel" back and forth between commits - may only my commits

  • git checkout commit (to be able to see the "whole" file - not just the changes - at a certain point in time)

Does something like this exist? I saw some node-git packages, may this is a starting point to implement something like this.

Collapse
 
eljayadobe profile image
Eljay-Adobe

There's a time-lapse view for git that mimics the time-lapse view that Perforce has in PV4.