Skip to content

Latest commit

 

History

History
37 lines (30 loc) · 784 Bytes

git.adoc

File metadata and controls

37 lines (30 loc) · 784 Bytes

Subtree

Add subtree

git fetch <repo>
git read-tree -u --prefix=vim/pack/bundle/start/ FETCH_HEAD

Update subtree from original repo

git fetch <repo>
git merge -s subtree --squash FETCH_HEAD
# if not work reset the merge and use this
git merge -X subtree=vim/pack/bundle/start/ --squash FETCH_HEAD

Add commit to original subtree for share with the original repo

git fetch <repo>
git checkout -b backport-plugin FETCH_HEAD
git cherry-pick -x --strategy=subtree <commit you want>
#git push

Extract dir to a sperate subtree

git checkout -b split-plugin
git filter-branch --subdirectory-filter vim/pack/own_plugin
git push -u <new repo for the dir> split-plugin:master