Skip to content

Instantly share code, notes, and snippets.

@cocoy
Created March 9, 2012 14:45
Show Gist options
  • Save cocoy/2006803 to your computer and use it in GitHub Desktop.
Save cocoy/2006803 to your computer and use it in GitHub Desktop.
Using git subtree to checkout a subdirectory
cd /tmp
git clone https://github.com/riptano/chef.git chef
cd chef
git subtree split -P cookbooks/cassandra/ -b cassandra
cd /tmp
mkdir cassandra
git init
git fetch ../chef cassandra
git checkout -b master FETCH_HEAD
## create github repo for cassandra
git remote add origin [email protected]:cocoy/chef-cassandra.git
git push origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment