git has lost my 3 last commits with no trace in the log. When I do git log synthesize.py the last reported change is commit id 71ef61c, but this change does not match what is in the file. The content of the file is as though the last 3 commits never happened.
The lost changes were originally on another branch (I think).
$ git log synthesize.py
commit 71ef61c
Author: Axel Bregnsbo <axbr@demant.com>
Date:   Thu Nov 5 10:53:12 2020 +0100
    Moved comment from DC setup.tcl to Triage synthesize.py.
commit 6cc8397
Author: Axel Bregnsbo <axbr@demant.com>
Date:   Thu Nov 5 10:18:59 2020 +0100
    Create symlink to latest synth log-file that has constant name.
Based on comment input from Don Branson and matt, I got this surprising result:
$ git rev-parse HEAD
c66c96b1336848803d55fc002942c42c07a701e7
$ git log --oneline
c66c96b Added dim support isters              <====== missing 3 changes
b279877 extra analysis job exit
0d32763 added possiat the end of the synth
...
ef75ccf added remove all uand error_check     <====== this commit threw out my changes!!!
71ef61c Moved comment fromge synthesize.py.   <====== the last of my 3 changes
7b2ffae added check_unused ports procedure
6cc8397 Create symli that has constant name.
When I diff the troublesome ef75ccf commit, git admits that is has changed synthesize.py, and a diff shows the deleted code. Why does commit ef75ccf not show up in git log synthesize.py ?
$ git diff 71ef61c ef75ccf --name-only
flow/ralgen/lego2-to-ipxact
flow/triage/tasks/synthesize.py     <======= 
My working directory is in sync with index and master and the remote repository. I have done git pull git push and git status and none of the commands report any local change or any un-updated stuff.
Git lost change describes the same problem, but was closed due to too few details provided.
Additional info answering questions in the comment field:
$ git log --graph 
* commit c66c96b
| Author: yyyy
| Date:   Tue Nov 10 11:32:20 2020 +0100
| 
|     Added dim support for both types of registers
| 
*   commit 8789184
|\  Merge: f1043b3 74288c7
| | Author: xxxx
| | Date:   Fri Nov 6 09:48:29 2020 +0100
| | 
| |     Merge branch 'develop' of gitlab.kitenet.com:higgs/tools into develop
| |
| *   commit ef75ccf                           <======== removes all my changes
| |\  Merge: 7b2ffae 71ef61c
| | | Author: xxxx
| | | Date:   Thu Nov 5 11:14:14 2020 +0100
| | | 
| | |     added remove all unconnected procedure and error_check
| | | 
| | * commit 71ef61c                            <========  my 3rd change
| | | Author: Axel Bregnsbo <axbr@demant.com>
| | | Date:   Thu Nov 5 10:53:12 2020 +0100
| | | 
| | |     Moved comment from DC setup.tcl to Triage synthesize.py.
| | | 
| | * commit 6cc8397
| | | Author: Axel Bregnsbo <axbr@demant.com>
| | | Date:   Thu Nov 5 10:18:59 2020 +0100
| | | 
| | |     Create symlink to latest synth log-file that has constant name.
| | |   
$ uname -a
Linux kbnuxsrv220 4.9.0-8-amd64 #1 SMP Debian 4.9.144-3 (2019-02-02) x86_64 x86_64 x86_64 GNU/Linux
$ git --version
git version 2.18.0.rc1.1.g6f333ff.dirty
$ git diff --cached
$ git status -s
$ rm synthesize.py
$ git status -s
 D synthesize.py
$ git checkout synthesize.py   
<file still missing changes>
 
     
     
    