Your branch is ahead of 'origin/master' by 1 commit.

$ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)

 

 

 

error: failed to push some refs to 'github.com:mm/raspberry-pi-os.git
86135@LAPTOP-BA80NAF0 MINGW64 /d/github/raspberry-pi-os (master)
$ git  add linux

86135@LAPTOP-BA80NAF0 MINGW64 /d/github/raspberry-pi-os (master)
$ git commit -m 'add kernel stack analysis'
[master ba2fd5e] add kernel stack analysis
 8 files changed, 1182 insertions(+)
 create mode 100644 linux/stack/.hello.ko.cmd
 create mode 100644 linux/stack/.hello.mod.o.cmd
 create mode 100644 linux/stack/.hello.o.cmd
 create mode 100644 linux/stack/Makefile
 create mode 100644 linux/stack/Module.symvers
 create mode 100644 linux/stack/hello.c
 create mode 100644 linux/stack/hello.mod.c
 create mode 100644 linux/stack/modules.order

86135@LAPTOP-BA80NAF0 MINGW64 /d/github/raspberry-pi-os (master)
$ git push -u origin master
Enumerating objects: 13, done.
Counting objects: 100% (13/13), done.
Delta compression using up to 8 threads
Compressing objects: 100% (9/9), done.
Writing objects: 100% (12/12), 6.82 KiB | 776.00 KiB/s, done.
Total 12 (delta 2), reused 1 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (2/2), completed with 1 local object.
remote: Internal Server Error
To github.com:m3/raspberry-pi-os.git
 ! [remote rejected] master -> master (Internal Server Error)
error: failed to push some refs to 'github.com:mm/raspberry-pi-os.git'

出现错误的主要原因是github中的XXX文件不在本地代码目录中

可以通过如下命令进行代码合并【注:pull=fetch+merge]

git pull --rebase origin master

86135@LAPTOP-BA80NAF0 MINGW64 /d/github/raspberry-pi-os (master)
$ git pull --rebase origin master
From github.com:m3/raspberry-pi-os
 * branch            master     -> FETCH_HEAD
Current branch master is up to date.

86135@LAPTOP-BA80NAF0 MINGW64 /d/github/raspberry-pi-os (master)
$ git push -u origin master
Enumerating objects: 13, done.
Counting objects: 100% (13/13), done.
Delta compression using up to 8 threads
Compressing objects: 100% (9/9), done.
Writing objects: 100% (12/12), 6.82 KiB | 873.00 KiB/s, done.
Total 12 (delta 2), reused 1 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (2/2), completed with 1 local object.
To github.com:m3/raspberry-pi-os.git
   2064c27..ba2fd5e  master -> master
Branch 'master' set up to track remote branch 'master' from 'origin'.

86135@LAPTOP-BA80NAF0 MINGW64 /d/github/raspberry-pi-os (master)
$

 

 

网络问题error: failed to push some refs to 

 

posted on 2022-03-17 22:09  tycoon3  阅读(740)  评论(0)    收藏  举报

导航