title: Move files with history to a new folder in same repository such that old commits will also be visible in the moved files
body: <p>|--.git<br />
  |-file1</p>
  <p>git log file1 // it will show the git history of the file</p>
  <p>commit 61892bb913db3e9815914e062439364a33366a78 (HEAD -&gt; main, origin/main, origin/HEAD)
  Author: abc 29479669+abc@users.noreply.github.com
  Date:   Thu May 12 16:52:57 2022 +0530</p>
  <pre><code>Update file1
  </code></pre>
  <p>commit a9015fbb8599f2f67da593f89634a728f04eb132
  Author: abc 79279569+abc@users.noreply.github.com
  Date:   Thu May 12 16:49:20 2022 +0530</p>
  <pre><code>Update file1
  </code></pre>
  <p>Now I want to move file1 to a folder -&gt; folder/file1</p>
  <p>|-.git<br />
  |-folder -&gt;file1</p>
  <p>and did -</p>
  <p>git checkout -b dummygit</p>
  <p>git mv file1 folder/file1</p>
  <p>git commit</p>
  <p>git log folder/file1</p>
  <p>commit 2596c755466152cf2d29e70bf99cabe18863a9bd9a (HEAD -&gt; dummygit, origin/dummygit)
  Author: abc abc@gmail.com
  Date:   Wed Jul 6 23:57:11 2022 +0530</p>
  <pre><code>moving file1 to folder
  </code></pre>
  <p>old commit history of this file is not present</p>
  <p>How can we move file in such way that after doing git log folder/file1 still can see the old history of the file</p>