$ sudo git push
To ssh://user@host/home/git/book
! [rejected] master -> master (non-fast forward)
error: failed to push some refs to 'ssh://user@host/home/git/book'
意思是你的 parent commit 和远端的不相同,也就是线路有分岔,需要先 pull 回來处理好 merge 才能 push 上去。
$ sudo git pull
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From ssh://user@host/home/git/book
60dec3f..71a50e6 master -> origin/master
Merge made by recursive.
docurl.text | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
$ sudo git push
Counting objects: 10, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 1.34 KiB, done.
Total 6 (delta 4), reused 0 (delta 0)
To ssh://user@host/home/git/book
71a50e6..433efea master -> master
阅读(1699) | 评论(0) | 转发(0) |