Skip to content

Instantly share code, notes, and snippets.

@d4nidev d4nidev/steps.md
Created May 26, 2017

Embed
What would you like to do?
Move history from a repo to another, filtering by folder
  1. git clone
  2. cd
  3. git remote rm origin
  4. git filter-branch --subdirectory-filter <directory 1> -- --all

You may need also to merge histories, if the new repo already exists. In order to do that, make:

  1. git pull --allow-unrelated-histories

And finally,

  1. git remote add
  2. git push -u origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.