Git submodule 使  稿submodule 

 Git  ()  :


git subtree

google repo


git subtree  git submodule 

 dotfiles 使 vim 

submodule  subtree 使


subtree 使:




git  (v1.5.2 )

 clone 

subtree  subtree 

submodules subtree  (.gitmodule) 




:


 (subtree) 

 upstream 



git subtree 使


git subtree 20125 git (1.7.11 ) OSX  homebrew使 subtree 

使git subtree  vim 

便




 prefix  subtree :
git subtree add --prefix .vim/bundle/tpope-vim-surround https://bitbucket.org/vim-plugins-mirror/vim-surround.git master --squash

( ?squash )

:
git fetch https://bitbucket.org/vim-plugins-mirror/vim-surround.git master
warning: no common commits
remote: Counting objects: 338, done.
remote: Compressing objects: 100% (145/145), done.
remote: Total 338 (delta 101), reused 323 (delta 89)
Receiving objects: 100% (338/338), 71.46 KiB, done.
Resolving deltas: 100% (101/101), done.
From https://bitbucket.org/vim-plugins-mirror/vim-surround.git
* branch            master     -} FETCH_HEAD
Added dir '.vim/bundle/tpope-vim-surround'

 vim-surround  merge commit :  
1bda0bd [3 minutes ago] (HEAD, stree) Merge commit 'ca1f4da9f0b93346bba9a430c889a95f75dc0a83' as '.vim/bundle/tpope-vim-surround' [Nicola Paolucci]
ca1f4da [3 minutes ago] Squashed '.vim/bundle/tpope-vim-surround/' content from commit 02199ea [Nicola Paolucci]

 upstream  subtree pull :
git subtree pull --prefix .vim/bundle/tpope-vim-surround https://bitbucket.org/vim-plugins-mirror/vim-surround.git master --squash

便


:
git remote add -f tpope-vim-surround https://bitbucket.org/vim-plugins-mirror/vim-surround.git

:
git fetch tpope-vim-surround master
git subtree pull --prefix .vim/bundle/tpope-vim-surround tpope-vim-surround master --squash

 upstream 




 upstream :
git remote add durdn-vim-surround ssh://git@bitbucket.org/durdn/vim-surround.git

 subtree push :
git subtree push --prefix=.vim/bundle/tpope-vim-surround/ durdn-vim-surround master

git push using:  durdn-vim-surround master
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 308 bytes, done.
Total 3 (delta 2), reused 0 (delta 0)
To ssh://git@bitbucket.org/durdn/vim-surround.git
02199ea..dcacd4b  dcacd4b21fe51c9b5824370b3b224c440b3470cb -} master

 pull-request 

subtree 使


git subtree  subtree  git subtree :

 git remote :
git remote add -f tpope-vim-surround https://bitbucket.org/vim-plugins-mirror/vim-surround.git

:
git merge -s ours --no-commit tpope-vim-surround/master

:
Automatic merge went well; stopped before committing as requested

:
git read-tree --prefix=.vim/bundle/tpope-vim-surround/ -u tpope-vim-surround/master

 ():
git ci -m"[subtree] adding tpope-vim-surround"

[stree 779b094] [subtree] adding tpope-vim-surround

subtree 使 pull :


 submodule 使subtree  submodule  git subtree Git 沿

Git @durdn  @AtlDevtools  


稿Atlassian Blogs Atlassian Blogs 稿