我希望忽略我的git项目中
这是我的
我不知道为什么会发生这种情况,也不知道该怎么做。
.obsidian/
文件夹内的workspace
文件。我已经修改了.gitignore
文件以实现这个目的。这是我的
.gitignore
文件: .obsidian/cache
.obsidian/workspace
.trash/
.DS_Store
然而,当文件发生更改时,我仍然收到这个消息:
➜ git status
On branch main
Your branch is ahead of 'origin/main' by 2 commits.
(use "git push" to publish your local commits)
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: .obsidian/workspace
no changes added to commit (use "git add" and/or "git commit -a")
我不知道为什么会发生这种情况,也不知道该怎么做。
git rm --cached
命令,然后将其添加到你的.gitignore
文件中。 - Binar Web