拉入Git失败后无法推送

拉入Git失败后无法推送,git,github,Git,Github,我有(一个Jupyter笔记本文件)。由于该文件是使用Google Colab创建的,所以它不存在于我的本地repo中,而仅存在于我的GitHub repo中 我刚刚添加了一个自述文件,并试图从本地repo推送到GitHub。但由于远程回购比本地回购早,我无法在提交后推动 然后我决定拉,但因为我不熟悉语法,所以在gitpull之后我没有指定任何参数。然后我再次尝试使用git pull origin master,但现在我收到一条错误消息,说有一个bug,并且repo名称改为“master | M

我有(一个Jupyter笔记本文件)。由于该文件是使用Google Colab创建的,所以它不存在于我的本地repo中,而仅存在于我的GitHub repo中

我刚刚添加了一个自述文件,并试图从本地repo推送到GitHub。但由于远程回购比本地回购早,我无法在提交后推动

然后我决定拉,但因为我不熟悉语法,所以在
gitpull
之后我没有指定任何参数。然后我再次尝试使用
git pull origin master
,但现在我收到一条错误消息,说有一个bug,并且repo名称改为“master | MERGING”……我知道我可能需要将远程设备拉到一个新的本地分支,并将其与我的主分支合并,但我不知道如何在这里执行,也害怕把整个事情搞砸。。。谢谢你的提示

georg@DESKTOP-9VE7F0E MINGW64 /d/Dropbox/WorkingDir/personal-projects/tf_and_col                                                                                                                                                                                               ab (master)
$ git commit -m "Add README file"
[master 13c0b76] Add README file
 1 file changed, 16 insertions(+)
 create mode 100644 README.md

georg@DESKTOP-9VE7F0E MINGW64 /d/Dropbox/WorkingDir/personal-projects/tf_and_col                                                                                                                                                                                               ab (master)
$ git push origin master
To https://github.com/georgeliu1998/tf_and_colab.git
 ! [rejected]        master -> master (fetch first)
error: failed to push some refs to 'https://github.com/georgeliu1998/tf_and_cola                                                                                                                                                                                               b.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

georg@DESKTOP-9VE7F0E MINGW64 /d/Dropbox/WorkingDir/personal-projects/tf_and_col                                                                                                                                                                                               ab (master)
$ git checkout master
Already on 'master'

georg@DESKTOP-9VE7F0E MINGW64 /d/Dropbox/WorkingDir/personal-projects/tf_and_col                                                                                                                                                                                               ab (master)
$ git pull
remote: Enumerating objects: 20, done.
remote: Counting objects: 100% (20/20), done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 18 (delta 5), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (18/18), done.
From https://github.com/georgeliu1998/tf_and_colab
   0a500ee..1238317  master     -> origin/master
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=origin/<branch> master


georg@DESKTOP-9VE7F0E MINGW64 /d/Dropbox/WorkingDir/personal-projects/tf_and_col                                                                                                                                                                                               ab (master)
$ git push origin master
To https://github.com/georgeliu1998/tf_and_colab.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/georgeliu1998/tf_and_cola                                                                                                                                                                                               b.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

georg@DESKTOP-9VE7F0E MINGW64 /d/Dropbox/WorkingDir/personal-projects/tf_and_col                                                                                                                                                                                               ab (master)
$ git remote
origin

georg@DESKTOP-9VE7F0E MINGW64 /d/Dropbox/WorkingDir/personal-projects/tf_and_col                                                                                                                                                                                               ab (master)
$ git pull origin
You asked to pull from the remote 'origin', but did not specify
a branch. Because this is not the default configured remote
for your current branch, you must specify a branch on the command line.

georg@DESKTOP-9VE7F0E MINGW64 /d/Dropbox/WorkingDir/personal-projects/tf_and_col                                                                                                                                                                                               ab (master)
$ git pull origin master
From https://github.com/georgeliu1998/tf_and_colab
 * branch            master     -> FETCH_HEAD
hint: Waiting for your editor to close the file... warning: failed to restrict f                                                                                                                                                                                               ile handles (2)

handle #0: 0000000000000434 (type 3, handle info (1) 0
handle #1: 0000000000000438 (type 3, handle info (1) 1

This is a bug; please report it at
https://github.com/git-for-windows/git/issues/new

To suppress this warning, please set the environment variable

        SUPPRESS_HANDLE_INHERITANCE_WARNING=1

error: cannot spawn C:/Users/georg/AppData/Local/atom/bin/atom.cmd: No such file                                                                                                                                                                                                or directory
error: unable to start editor 'C:/Users/georg/AppData/Local/atom/bin/atom.cmd'
Not committing merge; use 'git commit' to complete the merge.

georg@DESKTOP-9VE7F0E MINGW64 /d/Dropbox/WorkingDir/personal-projects/tf_and_col                                                                                                                                                                                               ab (master|MERGING)
$ git push origin master
To https://github.com/georgeliu1998/tf_and_colab.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/georgeliu1998/tf_and_colab.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

georg@DESKTOP-9VE7F0E MINGW64 /d/Dropbox/WorkingDir/personal-projects/tf_and_colab (master|MERGING)
$
georg@DESKTOP-9VE7F0E MINGW64/d/Dropbox/WorkingDir/个人项目/tf_和_col ab(主)
$git commit-m“添加自述文件”
[master 13c0b76]添加自述文件
1个文件已更改,16个插入(+)
创建模式100644 README.md
georg@DESKTOP-9VE7F0E MINGW64/d/Dropbox/WorkingDir/个人项目/tf_和_col ab(主)
$git推送原始主机
到https://github.com/georgeliu1998/tf_and_colab.git
! [已拒绝]主控->主控(先取)
错误:无法将某些引用推送到'https://github.com/georgeliu1998/tf_and_cola                                                                                                                                                                                               b、 吉特'
提示:更新被拒绝,因为远程包含您所做的工作
提示:本地没有。这通常是由另一个存储库推送引起的
提示:指向同一引用。您可能希望首先集成远程更改
提示:(例如,“git pull…”)然后再推。
提示:有关详细信息,请参阅“git push--help”中的“关于快进的说明”。
georg@DESKTOP-9VE7F0E MINGW64/d/Dropbox/WorkingDir/个人项目/tf_和_col ab(主)
$git签出主机
已经在“大师”节目中了
georg@DESKTOP-9VE7F0E MINGW64/d/Dropbox/WorkingDir/个人项目/tf_和_col ab(主)
$git拉力
远程:枚举对象:20,完成。
远程:计数对象:100%(20/20),完成。
远程:压缩对象:100%(12/12),完成。
远程:共18个(增量5),重复使用0个(增量0),包重复使用0个
拆包对象:100%(18/18),完成。
从…起https://github.com/georgeliu1998/tf_and_colab
0a500ee..1238317主控->原点/主控
当前分支没有跟踪信息。
请指定要与哪个分支合并。
有关详细信息,请参见git pull(1)。
吉特拉力
如果您希望为此分支设置跟踪信息,可以通过以下方式进行设置:
git分支——将上游设置为=原点/主节点
georg@DESKTOP-9VE7F0E MINGW64/d/Dropbox/WorkingDir/个人项目/tf_和_col ab(主)
$git推送原始主机
到https://github.com/georgeliu1998/tf_and_colab.git
! [已拒绝]主机->主机(非快进)
错误:无法将某些引用推送到'https://github.com/georgeliu1998/tf_and_cola                                                                                                                                                                                               b、 吉特'
提示:更新被拒绝,因为当前分支的提示已过期
提示:它的远程对应项。集成远程更改(例如。
提示:“git pull…”),然后再推。
提示:有关详细信息,请参阅“git push--help”中的“关于快进的说明”。
georg@DESKTOP-9VE7F0E MINGW64/d/Dropbox/WorkingDir/个人项目/tf_和_col ab(主)
$git远程
起源
georg@DESKTOP-9VE7F0E MINGW64/d/Dropbox/WorkingDir/个人项目/tf_和_col ab(主)
$git拉原点
您要求从远程“源”提取,但未指定
树枝。因为这不是默认的远程配置
对于当前分支,必须在命令行上指定分支。
georg@DESKTOP-9VE7F0E MINGW64/d/Dropbox/WorkingDir/个人项目/tf_和_col ab(主)
$git拉原点主控
从…起https://github.com/georgeliu1998/tf_and_colab
*分支主控->取头
提示:正在等待编辑器关闭文件。。。警告:未能限制f
origin/master: * -> * -> *
local/master:  \__ -> your commit
git checkout -b temp-updates
git checkout master
git reset --hard origin/master
git cherry-pick 166a17b4852f5b83a09c3198169d86959a68e3dd
git push origin master