thi*_*365 5 git version-control gitignore
我的问题不同于为什么gitignore在这种情况下没有工作?也没有.gitignore不工作
files/conf.php已经在.gitignore中,但git status仍显示其修改,为什么?
我的意思是如果它在.gitignore中不应该跟踪这个文件...
cat .gitignore
files/conf.php
[root@home blogmi]# git status
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: files/conf.php
#
no changes added to commit (use "git add" and/or "git commit -a")
Run Code Online (Sandbox Code Playgroud)
Lil*_*ard 11
.gitignore只忽略未跟踪的文件.一旦开始跟踪文件(就像你已经完成的那样files/conf.php),它就不会被忽略.
您可以使用git rm --cached files/conf.php从git中删除文件而不实际从文件系统中删除它.提交后,文件将开始被正确忽略.
| 归档时间: |
|
| 查看次数: |
1768 次 |
| 最近记录: |