title: How to remove git older commits and keep latest commit only?
body: <p>I have this requirement to drop all older commits and push recent commits only. so I am trying to remove the older commit which is g7688bc3... and keep 0455a4f67 this latest commit only on my branch.   I've tried hard reset, but still, an older commit exists, and rebase editor shows none of the commits to dropping. Any suggestion?.</p>
  <pre><code>commit 0455a4f6741942ea3a4526957dbb62c4cc144458f2
  Author: adminuser &lt;admin@email.com&gt;
  Date:   Thu Apr 1 11:55:39 2021 +0830
  
      Create test branch
  
  commit g7688bc3dhhd1a3642fg76b885b1ac87dc98658b27
  Author: rootuser &lt;admin@email.com&gt;
  Date:   Mon Nov 15 14:01:22 2020 +0830
  
      Create main branch
  </code></pre>