📌  相关文章
📜  Git:如何排除存储库中的子文件夹? - 无论代码示例

📅  最后修改于: 2022-03-11 14:57:54.536000             🧑  作者: Mango

代码示例1
Open the .git/info/exclude file in a text editor and add the folder to ignore. This file remains private to you. You can also create a .gitignore file in the repository's root directory, outside the .git directory and write the folder entry there. Then add this file to the repository to share with others what content should be ignored, should others have this directory-to-ignore in their repository too.

If you already committed this directory then just remove it with git rm -r --cached, commit the deletion and mark the directory ignored as I described above. You might want to make a backup of the directory before you wipe it.