// Clone the repo git clone --depth=1 git://someserver/somerepo dirformynewrepo // Remove the .git directory rm -rf !$/.git