triptico.com

Un naufragio personal

How can I split a single file from a git repo into a new repo?

Summary:

cd oldrepo
git fast-export HEAD -- myfile > ../myfile.fi
cd ..
mkdir newrepo
cd newrepo
git init
git fast-import < ../myfile.fi
git checkout