小编Ada*_*dam的帖子

GitBash | origin master - 被拒绝(首先获取)| GitHub 存储库中没有文件

我被这段代码困住了。在 git fetch 之后,我遇到了困难,不知道下一步应该做什么才能将所有提交的文件发送到 GitHub 服务器 - 现在只有一个文件 README.md 是在保存新存储库时自动创建的。感谢帮助。

Freeware Sys@DESKTOP-VK97GA5 MINGW64 ~/Desktop/Coding Staff/MustBeDone (master)
$ git status
On branch master
nothing to commit, working tree clean

Freeware Sys@DESKTOP-VK97GA5 MINGW64 ~/Desktop/Coding Staff/MustBeDone (master)
$ git remote add origin https://github.com/adambugaj/Lets-code.git

Freeware Sys@DESKTOP-VK97GA5 MINGW64 ~/Desktop/Coding Staff/MustBeDone (master)
$ git push -u origin master
To https://github.com/adambugaj/Lets-code.git
 ! [rejected]        master -> master (fetch first)
error: failed to push some refs to 'https://github.com/adambugaj/Lets-code.git'
hint: Updates were rejected because the remote contains work that you …
Run Code Online (Sandbox Code Playgroud)

git github git-push git-fetch git-bash

0
推荐指数
1
解决办法
4913
查看次数

标签 统计

git ×1

git-bash ×1

git-fetch ×1

git-push ×1

github ×1