Skip to content

Instantly share code, notes, and snippets.

@galkin
Created April 8, 2016 11:28
Show Gist options
  • Save galkin/d396d19a629be9e5adda58b33116b0d5 to your computer and use it in GitHub Desktop.
Save galkin/d396d19a629be9e5adda58b33116b0d5 to your computer and use it in GitHub Desktop.
subtree example
#Remove submodule
git submodule deinit ocv-raml
git rm ocv-raml
#Add new remote repository with specification
git remote add -f ocv-raml https://github.com/ThomasCookOnline/ocv-raml.git
#Copy paste all commits from spec to our repository
git read-tree --prefix=ocv-raml/ -u ocv-raml/master
#Commit new commits
git commit -m "Replace ocv-raml submodule by subtree"
#This command will be used for every update
git pull -s subtree ocv-raml master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment