改动过.gitignore文件之后,在repo的根目录下运行

# 先将当前仓库的文件的暂存区中剔除
git rm -r --cached .

# 再添加所有的文件到暂存区,这时.gitignore文件就会生效了
git add .

# 提交
git commit -m "fixed untracked files"

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-18
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-02-23
  • 2022-12-23
  • 2021-10-23
  • 2022-02-13
  • 2021-12-02
相关资源
相似解决方案