【问题标题】:About git commit error: pathspec 'A' did not match any file(s) known to git关于 git commit error: pathspec 'A' did not match any file(s) known to git
【发布时间】:2021-06-16 15:10:56
【问题描述】:
C:\Users\me\React_projects\react-basic\habit-tracker>git commit "habittracker"
error: pathspec 'habittracker' did not match any file(s) known to git

我的操作系统是 Windows。 让我知道我可以做些什么来承诺!!!!

【问题讨论】:

  • 你试过git fetch还是git checkout
  • 你的 repo 根目录下是否真的有一个名为 habittracker 的文件? (与.git同级)
  • 当我输入git chekout 时,致命:You are on a branch yet to be born 被打印出来。我该如何继续下一步?
  • 最后一条评论(git checkout 产生错误消息You are on a branch yet to be born)应该是问题的一部分。它告诉我问题出在哪里。

标签: git commit


【解决方案1】:

Atlassian 有一个非常全面的 git 指南: https://www.atlassian.com/git/tutorials/what-is-version-control

虽然 -
转到您的工作目录并编写以下命令:

git init
git add .
git commit -m 'your message describing what was done'

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-03-01
    • 2023-03-15
    • 2017-04-22
    • 2018-03-22
    • 1970-01-01
    • 1970-01-01
    • 2022-12-22
    • 2015-11-04
    相关资源
    最近更新 更多