相关疑难解决方法(0)

为什么我的Git repo进入了独立的HEAD状态?

我今天最终得到了一个独立的头,同样的问题如下所述:git push说一切都是最新的,即使我有本地更改

据我所知,我没有做任何与众不同的事情,只是从我当地的回购中提交和推送.

那我怎么最终得到一个detached HEAD

git

365
推荐指数
7
解决办法
20万
查看次数

提交没有出现在github上

  • 我在github上创建了一个新的存储库.
  • 我选择了添加README.md的其中一个选项.
  • 然后我在硬盘上插入项目.
  • 我在/Users/myusername/github/myproject/.git/中运行了git init:初始化的空Git存储库
  • 我跑了"git add".然后"git commit -m'project files'",回复了这个:

    [master (root-commit) ca52fe0] project files
     981 files changed, 257939 insertions(+), 0 deletions(-)
     create mode 100644 index.php
     create mode 100644 license.txt
     create mode 100644 readme.html
     create mode 100644 wp-activate.php
     ...
    
    Run Code Online (Sandbox Code Playgroud)
  • 然后我跑了"git remote add origin https://github.com/myusername/myproject.git "
  • 然后我跑了"git push origin master"
  • 然后我运行了"git status",没有任何提交

但我看看回购和我的"我的项目文件"提交不存在.那么我运行git pull并得到了这个:

You asked me to pull without telling me which branch you
want to merge with, and 'branch.master.merge' in
your configuration file does not tell me, either. Please …
Run Code Online (Sandbox Code Playgroud)

git github

15
推荐指数
1
解决办法
5万
查看次数

标签 统计

git ×2

github ×1