git-cheatsheet icon indicating copy to clipboard operation
git-cheatsheet copied to clipboard

Rewrite git repo to keep only destinct subfolder

Open madc opened this issue 10 years ago • 0 comments

    To rewrite the repository to look as if foodir/ had been its project root, and discard all other history:

    git filter-branch --subdirectory-filter foodir -- --all

http://stackoverflow.com/a/811384/709769

madc avatar Nov 25 '13 14:11 madc