【发布时间】:2022-01-23 10:20:09
【问题描述】:
我的一个项目中有一个 Git 子模块,我正在尝试在我进行了一些更改的本地副本上更新它。我希望遥控器覆盖我的本地更改,但是当我尝试以下命令时,没有任何反应,我仍然看到我的本地更改。
joesan@joesan-S-14-v5:~/Projects/Private/github-docs/joesan-me/themes/hugo-clarity$ git status
HEAD detached at d5800ff
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: exampleSite/config/_default/params.toml
no changes added to commit (use "git add" and/or "git commit -a")
joesan@joesan-S-14-v5:~/Projects/Private/github-docs/joesan-me/themes/hugo-clarity$
我在这里做错了什么?
【问题讨论】:
-
git status表示检查和报告,所以它当然没有改变任何东西。如果您想撤消一个文件,请使用git restore,因为它建议您使用git reset --hard,以非常破坏性地撤消所有内容。
标签: git git-submodules