Skip to content

GIT解惑-修改了.gitignore 文件不生效 #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sunmaobin opened this issue Jul 13, 2018 · 0 comments
Open

GIT解惑-修改了.gitignore 文件不生效 #55

sunmaobin opened this issue Jul 13, 2018 · 0 comments
Assignees
Milestone

Comments

@sunmaobin
Copy link
Owner

有时候修改了 .gitignore 文件不生效,执行如下命令重新刷新下缓存就可以了。

git rm -r --cached .
git add .
git commit -m 'update cached'

另外要说的是,如果这个项目是一个团队多个人协作,那么需要每个人都执行这个命令,大家一起清理。不然你忽略了,别的人又上传了,还是不会生效。

@sunmaobin sunmaobin added this to the 2018年 milestone Jul 13, 2018
@sunmaobin sunmaobin self-assigned this Jul 13, 2018
@sunmaobin sunmaobin added the GIT label Jul 13, 2018
@sunmaobin sunmaobin changed the title GIT解惑 - 修改了.gitignore 文件不生效 GIT解惑-修改了.gitignore 文件不生效 Apr 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant