title: How to sync Perforce to Git while keeping existing Git commit hashes?
body: <p>I'm in the process of moving our repository to git. During the transition, engineers will still be submitting to the Perforce repository. While engineers are still working, I'll be switching systems to use the Git repository. As such, I've been doing the following to keep the repositories in sync:</p>
  
  <pre><code>rm -rf family
  git clone ssh://git@example.com:7999/project/family.git
  
  cd family
  git p4 sync //depot/project/family@all
  git rebase remotes/p4/master
  git push -f
  </code></pre>
  
  <p>This works fine, but one of our tools needs the commit hashes to stay the same; the above creates new commits and, therefore, new commit hashes. Is what I need even possible with <code>git-p4</code> and <code>git</code>? If so, I'm imagining it'll require magic with <code>update-refs</code>, etc and I'm still on the learning curve when it comes to <code>git</code> plumbing commands.</p>