【问题标题】:"Git: Failed to execute" when trying to commit changes尝试提交更改时出现“Git:执行失败”
【发布时间】:2021-12-18 12:04:44
【问题描述】:

当我尝试通过 Visual Studio 提交更改时,我收到了以下消息:

Git:执行失败

当我推送我的项目时,控制台日志Everything up-to-date

当我输入 git status 时,我有以下日志:

On branch main
Your branch is up to date with 'master/main'.

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)
  (commit or discard the untracked or modified content in submodules)
        modified:   backend (modified content)

no changes added to commit (use "git add" and/or "git commit -a")

此外,在 Github.com 上,我无法访问某些文件夹,右侧有一个箭头(如果被问到,我可以张贴图片或指向我的仓库的链接)。

直到昨天一切正常,但我不明白问题出在哪里。

【问题讨论】:

  • 您在 committing 时报告了一个问题,另一个与 pushing 相关,第三个与 Github 上的文件夹访问有关的问题。最好不要将这些问题混在一个问题中。

标签: git github


【解决方案1】:

https://stackoverflow.com/a/57166275/17326134

试试这个,或者使用 git status 来显示你是否做了一些需要推送的更改。如果是这样,请添加更改然后提交并修复一些冲突。然后你可以 git pull 或 fetch --all。

另外,先尝试 git fetch --all 然后添加并提交更改。

【讨论】:

  • 由于他们可以输入git status 并获得响应,因此没有初始化 Git 存储库似乎不是问题。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2013-07-08
  • 2019-07-12
  • 1970-01-01
  • 1970-01-01
  • 2017-07-09
  • 2021-09-13
  • 2018-07-02
相关资源
最近更新 更多