What does green folder icon in github web interface mean?

后端 未结 3 1092
予麋鹿
予麋鹿 2021-01-23 06:15

I wanted to add some folder in my current git repo.

but i have received such green folder in the github the following image . How to add this folder into this project.<

3条回答
  •  北恋
    北恋 (楼主)
    2021-01-23 06:56

    That folder icon is how Github shows submodules

    A submodule is essentially a reference to another repository (specifically, a specific commit in another repository)

    There should be a .gitmodules file at the root of the repository, containing something like this:

    $ cat .gitmodules
    [submodule "ca_log_analysis"]
          path = ca_log_analysis
          url = git://github.com/example/ca_log_analysis_repo.git
    

    You could commit your changes to that linked repository, then update the master project to look at the new commit. The Git book chapter on submodules should explain things

提交回复
热议问题