mohamed@mohamed:~/Projects/skyrocket$ git status
On branch dev/SMMWEB-36
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: config/puppet/modules/apt (new commits)
modified: config/puppet/modules/augeas (new commits)
modified: config/puppet/modules/concat (new commits)
modified: config/puppet/modules/elasticsearch (new commits)
modified: config/puppet/modules/file_concat (new commits)
modified: config/puppet/modules/git (new commits)
modified: config/puppet/modules/php (new commits)
modified: config/puppet/modules/postgresql (new commits)
modified: config/puppet/modules/redis (new commits)
modified: config/puppet/modules/stdlib (new commits)
modified: config/puppet/modules/vcsrepo (new commits)
Untracked files:
(use "git add <file>..." to include in what will be committed)
.idea/copyright/
config/puppet/modules/blackfire/
config/puppet/modules/inifile/
dump.rdb
keys.dev.pub
keys.tags.pub
no changes added to commit (use "git add" and/or "git commit -a")
我不知道“new commits”是什么意思? 我不想提交这些文件。 我试图执行以下操作:
$ git checkout -- .
如果我将config/puppet/*放入gitignore文件中,然后按照以下方式更新缓存,会发生什么?
$ git rm --cached -r .
这样做会在推送或合并到其他分支后从版本库中删除这些文件吗?
--hard
中,--
和hard
之间不应有空格。否则它将被视为git reset -- <path>
。请参考--hard
和git reset -- <path>
。 - Gino Mempin