Why github display gray folder to when I create a new repository?

前端 未结 1 1520
猫巷女王i
猫巷女王i 2021-01-15 15:32

Git command :

git init
git add .
git commit -m \"project\"
git remote add origin https://github.com/
git push -u origin master

Gray Folder

相关标签:
1条回答
  • 2021-01-15 15:42

    Because your repo includes a nested git repo (a subfolder with a .git/ folder in it).

    When you do a git add ., you will record that subfolder as a gitlink (special entry in the index) which, once pushed to your GitHub repo, is displayed as a grayed folder.

    See also "Difference between nested git repos and submodules".

    If you want to include that folder content into your sources, simply remove the .git folder of that gray directory, do a git add . again, commit and push.

    0 讨论(0)
提交回复
热议问题