Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
extract repo from git folder

git commands

git clone --mirror ssh:// filtered-repo
cd filtered-repo
git filter-branch --prune-empty --subdirectory-filter some/folder/path/ master
cd ..
git clone ./filtered-repo new-repo
cd new-repo
git status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment