git-time-metric / gtm

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

Squash merge and gtm? #99

Closed sdg9 closed 5 years ago

sdg9 commented 5 years ago

I have the following setup

  1. Master branch
  2. Branch 1 created off master, PR then squash merged to master
  3. Branch 2 off master, PR not yet merged to master

I noticed Master has none of branch 1's time and branch 2 doesn't have it either. Is this because I'm squash merging PRs?

If that is the problem I can switch back to regular merge, but is there any way to manually move that time over from branch 1 to master and branch 2?

You can see below where master looks like no updates since Sat and branch 1 has updates June 24th that branch 2 doesn't have.

Master

λ gtm report -this-month --format timeline-hours

             00.01.02.03.04.05.06.07.08.09.10.11.12.01.02.03.04.05.06.07.08.09.10.11.
             ------------------------------------------------------------------------
Fri Jun 14 |                               ▁▁▁▇▇▇███▅▅▅▁▁▁▁▁▁▆▆▆         ▄▄▄▁▁▁▄▄▄███ |    5h  8m  0s
             ------------------------------------------------------------------------
Sat Jun 15 | ▁▁▁                           ▁▁▁▇▇▇                              ▃▃▃███ |    2h  8m  0s
             ------------------------------------------------------------------------
Sun Jun 16 |                                           ▃▃▃                  ▆▆▆███▄▄▄ |    2h 28m  0s
             ------------------------------------------------------------------------
Tue Jun 18 |                                                                ▂▂▂▅▅▅▁▁▁ |       57m  0s
             ------------------------------------------------------------------------
Wed Jun 19 |                                                       ▃▃▃▅▅▅▁▁▁▅▅▅▇▇▇███ |    3h 10m  0s
             ------------------------------------------------------------------------
Thu Jun 20 | ▄▄▄                                                ▂▂▂███▄▄▄      ▅▅▅▅▅▅ |    3h 12m  0s
             ------------------------------------------------------------------------
Fri Jun 21 |                      ▁▁▁   ▆▆▆███▇▇▇▂▂▂   ██████▅▅▅               ▄▄▄███ |    6h 28m  0s
             ------------------------------------------------------------------------
Sat Jun 22 | ███▁▁▁                        ▁▁▁                                 ▅▅▅▄▄▄ |    2h 11m  0s
             ------------------------------------------------------------------------
                                                                                          25h 42m  0s

Branch 1

λ gtm report -this-month --format timeline-hours

             00.01.02.03.04.05.06.07.08.09.10.11.12.01.02.03.04.05.06.07.08.09.10.11.
             ------------------------------------------------------------------------
Fri Jun 14 |                               ▁▁▁▇▇▇███▅▅▅▁▁▁▁▁▁▆▆▆         ▄▄▄▁▁▁▄▄▄███ |    5h  8m  0s
             ------------------------------------------------------------------------
Sat Jun 15 | ▁▁▁                           ▁▁▁▇▇▇                              ▃▃▃███ |    2h  8m  0s
             ------------------------------------------------------------------------
Sun Jun 16 |                                           ▃▃▃                  ▆▆▆███▄▄▄ |    2h 28m  0s
             ------------------------------------------------------------------------
Tue Jun 18 |                                                                ▂▂▂▅▅▅▁▁▁ |       57m  0s
             ------------------------------------------------------------------------
Wed Jun 19 |                                                       ▃▃▃▅▅▅▁▁▁▅▅▅▇▇▇███ |    3h 10m  0s
             ------------------------------------------------------------------------
Thu Jun 20 | ▄▄▄                                                ▂▂▂███▄▄▄      ▅▅▅▅▅▅ |    3h 12m  0s
             ------------------------------------------------------------------------
Fri Jun 21 |                      ▁▁▁   ▆▆▆███▇▇▇▂▂▂   ██████▅▅▅               ▄▄▄███ |    6h 28m  0s
             ------------------------------------------------------------------------
Sat Jun 22 | ███▁▁▁                        ▁▁▁                                 ▅▅▅▄▄▄ |    2h 14m  0s
             ------------------------------------------------------------------------
Mon Jun 24 |                                                 ▁▁▁▁▁▁         ▁▁▁███▇▇▇ |    1h 59m 14s <-- missing from master & branch 2
             ------------------------------------------------------------------------
                                                                                          27h 44m 14s

Branch 2

λ gtm report -this-month --format timeline-hours

             00.01.02.03.04.05.06.07.08.09.10.11.12.01.02.03.04.05.06.07.08.09.10.11.
             ------------------------------------------------------------------------
Fri Jun 14 |                               ▁▁▁▇▇▇███▅▅▅▁▁▁▁▁▁▆▆▆         ▄▄▄▁▁▁▄▄▄███ |    5h  8m  0s
             ------------------------------------------------------------------------
Sat Jun 15 | ▁▁▁                           ▁▁▁▇▇▇                              ▃▃▃███ |    2h  8m  0s
             ------------------------------------------------------------------------
Sun Jun 16 |                                           ▃▃▃                  ▆▆▆███▄▄▄ |    2h 28m  0s
             ------------------------------------------------------------------------
Tue Jun 18 |                                                                ▂▂▂▅▅▅▁▁▁ |       57m  0s
             ------------------------------------------------------------------------
Wed Jun 19 |                                                       ▃▃▃▅▅▅▁▁▁▅▅▅▇▇▇███ |    3h 10m  0s
             ------------------------------------------------------------------------
Thu Jun 20 | ▄▄▄                                                ▂▂▂███▄▄▄      ▅▅▅▅▅▅ |    3h 12m  0s
             ------------------------------------------------------------------------
Fri Jun 21 |                      ▁▁▁   ▆▆▆███▇▇▇▂▂▂   ██████▅▅▅               ▄▄▄███ |    6h 28m  0s
             ------------------------------------------------------------------------
Sat Jun 22 | ███▁▁▁                        ▁▁▁                                 ▅▅▅▄▄▄ |    2h 11m  0s
             ------------------------------------------------------------------------
Mon Jun 24 |                                                                      ▁▁▁ |        4m 46s
             ------------------------------------------------------------------------
Tue Jun 25 |                                                                ▂▂▂██████ |    2h  7m  0s
             ------------------------------------------------------------------------
Wed Jun 26 | ▁▁▁                                                                      |        3m  0s
             ------------------------------------------------------------------------
                                                                                          27h 56m 46s
sdg9 commented 5 years ago

I solved this by creating a new branch, merging branch 1 and branch 2 commits into that branch, PRing it, then merging (no squash) into master.