How to make part of an existing GIT repository a submodule -


I have this GIT repository with two folders: binary-search and poker . For example,

I will create these folders in subdomains and keep their change history.

How can I do this?

The general idea is to use the following steps:

1 ) Create a submode using the --subdirectory-filter> filter-branch (after your repo cloning).

$ git filter-branch --subdirectory-filter ABC head - --all

For more on this step, refer to it.

2) To remove the sub-commode, create a Superpequite using an index filter of filter-branch .

  $ git filter-branch - index-filter "git rm -r -f -cached --ignore-unmatch ABC" - full-empty HEAD  
< P> 3) Commit the submodic in the latest version of SuperPage.

See for a practical example.

Each subdomain will maintain its history.
But as it has been said in this, it will be:

Lose all historic connections between superproducts and subploads, ' git bisect ' Like tools break, and old ones make it difficult to recover.

Ideally, each version of the newly created SuperProject will be linked to the correct version of the subdomium (and all .gitmodules entries will be fully installed in the entire project history too)

< / Blockquote>

If you are not connected to new submodules for the history already associated, you can follow the steps outlined above.
But if you need branches from the old point, take your submodules (which are currently simp, take sub-directories), then you might consider trying the script outlined in patch. I discussed about it But Git has been integrated so far, as Juno C Hamano says:

Unfortunately, I do not think we are fully designed to see different points Have done so The only one that has been taken into the superproduct tree is the subdomain.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -