title: Git: move part from one repo to other repo with history
body: <p>I have two git repositories: repo1 and repo2. repo1 contains folders "dir_a", "dir_b" and other. How I can transfer all files including git history from dir_a and dir_b of repo1 to repo2?</p>
  
  <p>I've found some helpful article for such task: <a href="http://gbayer.com/development/moving-files-from-one-git-repository-to-another-preserving-history" rel="nofollow">http://gbayer.com/development/moving-files-from-one-git-repository-to-another-preserving-history</a>. However, it is not fully suitable for me because I need to transfer 2 directories.</p>