Finding All (or most) Commits to a Feature
The other day my supervisor asked me an interesting question. He wanted to know how much time we spent developing a new feature. The feature was massive and we started working on it late last year and is just now about to come out of beta. There were a bunch of issues trying to figure this out: nobody was dedicated full time to it, it’s been worked on in fits and starts during that time, and we don’t currently track our time at this level of detail. It became an interesting thought process.
Most of the time we worked on the feature in a big block of time so our thought was to use the commit times for the various logs to estimate when we started and stopped working on it each day. We knew that the majority of the code existed in three places application/views/scripts/feature/, application/controllers/FeatureController.php, and application/models/Feature. We ran the following three commands to generate a list of commits that touched those three places.
This gave us output that looked like the following.
The downside to this process of running the git
command three times is that some of the commits touched all three places so there was some duplication of each commit. To fix this we had to run it through the uniq
command to find just the unique values.
See how a3ad753 is no longer listed.
The next step was for us to import the data into Google Sheets so we could determine the time ranges. We could have used a database for this but we thought Sheets would be faster because we had to massage the data a little because it’s missing a lot of information.
Scott Keck-Warren
Scott is the Director of Technology at WeCare Connect where he strives to provide solutions for his customers needs. He's the father of two and can be found most weekends working on projects around the house with his loving partner.
Top Posts
- Working With Soft Deletes in Laravel (By Example)
- Fixing CMake was unable to find a build program corresponding to "Unix Makefiles"
- Upgrading to Laravel 8.x
- Get The Count of the Number of Users in an AD Group
- Multiple Vagrant VMs in One Vagrantfile
- Fixing the "this is larger than GitHub's recommended maximum file size of 50.00 MB" error
- Changing the Directory Vagrant Stores the VMs In
- Accepting Android SDK Licenses From The OSX Command Line
- Fixing the 'Target class [config] does not exist' Error
- Using Rectangle to Manage MacOS Windows