title: git move repository to another repository as a directory
body: <p>How do I move repository (old_rep) to another repository (new_rep) as a directory without loosing the history and files for repositories?</p>
  
  <p>Here is what I tried from other stack questions. I have files in new_repo like directories, .txt, .sql files with history. When I run the codes below, looks like the --mirror is replacing everything from old_rep into new_rep. </p>
  
  <pre><code>mkdir foo
  cd foo 
  
  git clone --bare ssh://git@test.test.test/test/old_rep.git
  
  cd old_rep.git 
  git clone --bare ssh://git@test.test.test/test/new_rep.git
  
  cd ..
  rm -rf old_rep.git
  </code></pre>