当我这样做时git status,我看到的是:
$ git status
# On branch master
# Your branch is ahead of 'github/master' by 1 commit.
# (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 checkout -- <file>..." to discard changes in working directory)
# (commit or discard the untracked or modified content in submodules)
#
# modified: octopress (modified content, untracked content)
#
no changes added to commit (use "git add" and/or "git commit -a")
Run Code Online (Sandbox Code Playgroud)
当我这样做时git rm -rf octopress,这就是我所看到的:
$ git rm -rf octopress
error: submodule 'octopress' (or one of its nested submodules) uses a .git directory
(use 'rm -rf' if you really want to remove it including all of its history)
Run Code Online (Sandbox Code Playgroud)
想法?
此错误消息也让我感到困惑,但它想说的是您应该使用rm -rf,而不是 git rm -rf:
(use 'rm -rf' if you really want to remove it including all of its history)
Run Code Online (Sandbox Code Playgroud)
所以,你应该能够做到这一点:
$ rm -rf octopress
$ git rm octopress
Run Code Online (Sandbox Code Playgroud)