突然间,git开始跟踪
~/.config/chromium
目录。我的代码库路径看起来像这样:~/app/my-project
。我的猜测是,Chromium目录被添加到仓库中,是因为我从my-project目录中使用禁用web安全标志启动了Chromium。我尝试使用git rm --cached ~/.config
将其删除,但是我得到了以下错误信息:
fatal: /home/user/.config: '/home/user/.config' is outside repository
有什么想法可以让它跟踪并同时声称它在仓库之外吗?我该如何解决这个问题?我宁愿避免删除我的~/.config
目录。
git状态:
src/pages/Page.js
~/.config/chromium/Default/Cache/xyz
~/.config/chromium/Default/Cache/abc
~/.config/chromium/Local State
git status
是什么样子? - grepsedawkgit status
,但它看起来像是在引用home。 - Dune