- 我在github上创建了一个新的存储库。
- 我选择了添加README.md的选项之一。
- 我然后cd到我的硬盘上的项目。
- 我运行git init:在/Users/myusername/github/myproject/.git/中初始化空的Git存储库
我运行了“git add”。然后“混帐提交-m‘项目文件’”,这本回应:承诺没有显示在github上
[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 ...
- 然后我跑了“git的远程添加原产https://github.com/myusername/myproject.git”
- 然后我跑了“混帐推起源大师”
- 然后我跑了“git状态”,表示什么都没有提交
但我看回购和我的“我的项目文件”提交不存在。所以然后我跑git拉,得到这个:
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
specify which branch you want to use on the command line and
try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details.
然后git推,并再次检查,仍然我的提交不在github回购。我唯一能看到提交的时候是当我运行“git log”的时候:
MacBook-myproject myusername$ git log
commit ca52fe090e6dbf1b6aa6ee51c3283efbe7549904
Author: User <myemailaddress>
Date: Sat Jun 23 19:22:05 2012 -0400
project files
我跟着github的方向,我可以做得最好。我究竟做错了什么?
你的'origin'版本库URL是否正确?试试'$ git remote -v'来验证。 –
当我运行上面的命令,我得到这个:原始\t https://github.com/username/gitproject.git(fetch) 原点\t https://github.com/username/gitproject.git(推) – JohnMerlino
你是从字面上得到这些URL还是你改变“用户名”和“gitproject.git”是更通用的? –