(The common practice is to not store the entire history of the subproject in your main repository, but If you want to preserve it just omit the –squash flag. vim/bundle/tpope-vim-surround main -squash You can copy the code to a new folder, but you will lose all the Git history related to it, which can be very detrimental in large projects. First add git subtree at a specified prefix folder: git subtree add -prefix. Git expects you to create a new empty directory for it, and clone the submodule into the project. If you just want a couple of one-liners to cut and paste, read this paragraph. With git you can use so-called submodules to make a specific snapshot of a git repository part of another git repository. The quick and dirty way without remote tracking Here is a canonical example of tracking a vim plug-in using git subtree. A submodule contains the name, url and revision of another repository. The version installed by homebrew on OSX already has subtree properly wired, but on some platforms you might need to follow the installation instructions. Git subtree is available in stock version of Git since May 2012 – v1.7.11 and above. The responsibility of not mixing super and sub-project code in commits lies with you.Contributing code back upstream for the sub-projects is slightly more complicated.You must learn about a new merge strategy (i.e. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |