What is a subproject commit?

前端 未结 2 1287
暖寄归人
暖寄归人 2021-01-31 08:13

I\'m trying to add the Laravel files to a Github repo.

I ran

$ git clone https://github.com/laravel/laravel.git

The files show up fine loca

2条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-31 08:41

    A submodule commit is a gitlink, special entry recorded in the index, created when you add a submodule to your repo;

    It records the SHA1 currently referenced by the parent repo.

    A git submodule update --init is enough to populate the laravel subdirectory in your repo.

    Once it is filled, note that your submodule repo is in a detached HEAD mode.

    As shown here, when switching branches in the parent repo, your submodule gitlink will change accordingly, but your submodule content won't change until you make again a git submodule update (after the git checkout)

提交回复
热议问题