【发布时间】:2015-04-30 20:55:17
【问题描述】:
我试图不包含一些要提交的文件。例如,我不希望将以下文件中的任何更改包含在提交中:
bootstrap/start.php
所以我将它们包含在 .gitignore 中,如下所示:
/bootstrap/compiled.php
/bootstrap/start.php
/vendor
composer.phar
composer.lock
.env.local.php
.env.php
.DS_Store
Thumbs.db.idea
.idea/
/public/dbase
/public/user_images
/app/config/lenovo
但是当我运行git status 时,我仍然收到这条消息:
On branch master
Your branch is up-to-date with 'origin/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: .gitignore
modified: bootstrap/start.php
no changes added to commit (use "git add" and/or "git commit -a")
如何做到这一点?谢谢
【问题讨论】:
标签: git gitignore git-commit