title: How to make a visible github fork without the commit history?
body: <p>Let's say you want to clone an old (GitHub) repository <strong>A</strong> into your own repository <strong>B</strong>. However, you don't need any branches nor do you want the very long commit history. What you want is a <em>shallow</em> clone as a <em>snapshot</em> of the most current status of the repo. Preferably with the latest commit messages, only, while still showing from what point in <code>A</code> it was forked from. This is graphically shown in GitHubs <code>Insights &gt; Network</code> tab, as arrows going from one users repo to another. </p>
  
  <p>The problem is that of the solutions I've tried to so far, all end up making a <strong>gap</strong> in the GitHub <code>Network</code> graph. This is probably because they all rely on either removing/restoring <code>.git</code> or <em>force</em> pushing which seem to cause the GitHub UI to disconnect the clone/fork, and instead it end up looking like this:</p>
  
  <p><a href="https://i.stack.imgur.com/PhkYd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PhkYd.png" alt="enter image description here"></a></p>
  
  <p>I'm not sure how to best phrase this question as there are already several dozens that sound very similar if not the same, while none of them seem to address this issue, if it is even possible.</p>
  
  <p>So the question is: </p>
  
  <p><strong>How can I keep the forks dependency in GitHubs <code>Network</code> graph, while still having removed most of the commit history?</strong></p>
  
  <p>(I understand that I can't remove the <em>whole</em> history and still have <em>something</em> connected in the graph, but shouldn't it be possible to squash the fork in such a way that all commits in <code>A</code> is turned into <em>one</em> squashed commit (as seen from the fork), while all new ones in <code>B</code> are normal?)</p>
  
  <hr>
  
  <p>I've looked at these answers, but they were not of much help:</p>
  
  <ul>
  <li><a href="https://www.atlassian.com/blog/git/handle-big-repositories-git" rel="nofollow noreferrer">How to handle big repositories with Git</a> - looked promising but didn't have any details</li>
  <li><a href="https://stackoverflow.com/questions/7244321/how-do-i-update-a-github-forked-repository">How do I update a GitHub forked repository?</a></li>
  <li><a href="https://help.github.com/en/articles/syncing-a-fork" rel="nofollow noreferrer">Sync a fork of a repository to keep it up-to-date with the upstream repository.</a></li>
  <li><a href="https://stackoverflow.com/questions/20984802/how-can-i-keep-my-fork-in-sync-without-adding-a-separate-remote">How can I keep my fork in sync without adding a separate remote?</a></li>
  </ul>