git-time-metric / gtm

Simple, seamless, lightweight time tracking for Git
MIT License
979 stars 52 forks source link

After an interactive rebase with squashing and commit reordering, we lose the time tracking data #103

Open rahal opened 4 years ago

rahal commented 4 years ago

Hi, I'm trying to use gtm with my team to track all our time spent on a projet and it works pretty good ( we are able merge notes ). The problem happens when the commit hash changes, usualy when we reorder or squash our commits, gtm report just show 0s for those commits. Now I'm almost sure that the time tracking info is still the note, but gtm report shows only data for the current hash. I can see 2 options : Easy : Would it be possible to show all the time tracking info? and can we update time info for a specific commit hash ( this one could be very usefull )? More complex : Maybe track hash changes and squashes then update the time info automatically

Thank you for the great tool

acuarica commented 4 years ago

Hi rahal,

I am having another situation when I'm losing pending tracking data. I'm not quite sure if they are related, so I'll open another issue.

powerpaul17 commented 4 years ago

I also ran into this issue, my workflow includes rebasing/amending which leads to "loss" of time data. It is not actually lost, but it will not counted in the reports apparently. Ideally amending/rebasing would track the already added time (maybe through the commit hashes), but a quick solution would be to simply include the time as "additional" in the total sum.

powerpaul17 commented 4 years ago

Just for info, the problem I was having was because of gitg which seems to not work well when amending a commit. Using VS Code or the command line has the desired behaviour.

powerpaul17 commented 4 years ago

Also see this: https://github.com/git-time-metric/gtm/issues/53

rahal commented 4 years ago

Sorry for the delay, Thank you @powerpaul17 and @acuarica , I'm mostly using the command line for the rebase/amend. That said, I stopped trying to merge time tracking for now but I'm still using gtm to track my own time.