Gitignore 不处理新代表
Gitignore not working on new rep
我正在使用 win10 和 sublime 3。
我的.git忽略看起来像:
node_modules/
另请注意,当我创建新的 gitignore 并尝试将其保存为 ".gitignore" 时,文件名是空的,因此我必须手动将其更改为 ".git忽略"。
我想从现有项目创建新的 git 存储库。 (我在 bitbucket 上创建了一个新的 repo)。
所以我得到了我的项目文件夹并执行以下操作:
git init
git remote add origin https://xxx@bitbucket.org/xxx/website-materialdesign.git
git add .
而且我可以看到它没有忽略 node_modules 因为我可以看到他抛出来自 node_modules.
的警告
我做错了什么?
似乎在 win10 上,当您保存扩展名为 "All files" 且文件名为“.gitignore”的文件时,它会创建一个看似空文件名的文件。
这很好,因为这是我设法让我的 gitignore 文件工作的唯一方法。
我正在使用 win10 和 sublime 3。
我的.git忽略看起来像:
node_modules/
另请注意,当我创建新的 gitignore 并尝试将其保存为 ".gitignore" 时,文件名是空的,因此我必须手动将其更改为 ".git忽略"。
我想从现有项目创建新的 git 存储库。 (我在 bitbucket 上创建了一个新的 repo)。
所以我得到了我的项目文件夹并执行以下操作:
git init
git remote add origin https://xxx@bitbucket.org/xxx/website-materialdesign.git
git add .
而且我可以看到它没有忽略 node_modules 因为我可以看到他抛出来自 node_modules.
的警告我做错了什么?
似乎在 win10 上,当您保存扩展名为 "All files" 且文件名为“.gitignore”的文件时,它会创建一个看似空文件名的文件。
这很好,因为这是我设法让我的 gitignore 文件工作的唯一方法。