Skip to content

Instantly share code, notes, and snippets.

@euank
Created January 20, 2017 10:55
Show Gist options
  • Save euank/150aac8eb9bdd3b3397b56960d3ac8f1 to your computer and use it in GitHub Desktop.
Save euank/150aac8eb9bdd3b3397b56960d3ac8f1 to your computer and use it in GitHub Desktop.
Moving subtrees, but the modern way
$ git clone https://github.com/kubernetes/kubernetes && cd kubernetes
$ git remote add rktlet https://github.com/kubernetes-incubator/rktlet
$ git fetch rktlet
$ git checkout rktlet/master
$ git subtree split -P rktlet -b rktlet-subtree
# note -P rktlet is the subdir 'rktlet' and -b is the arbitrary branch name
$ git checkout master # kubernetes
$ rm -rf ./pkg/kubelet/rktshim/ && git commit -avm "rktshim: delete old code"
$ git subtree add -P pkg/kubelet/rktshim rktlet-subtree
$ # Done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment