簡體   English   中英

在 `git push` 上出現錯誤,但推送操作似乎是成功的

[英]Getting errors on `git push`, but the push action seems to be successful

當我推送到 github 時,我收到一條錯誤消息,提示 git 無法推送某些引用,但我可以在遠程看到推送成功。

以下是詳細信息:

[akhann16@login006 swift_proj]$ git push
warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:
  git config --global push.default matching
To squelch this message and adopt the new behavior now, use:
  git config --global push.default simple
See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)
Counting objects: 7, done.
Delta compression using up to 24 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (5/5), 1.17 KiB | 0 bytes/s, done.
Total 5 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To git@github.com:khanna-lab/cadre.git
   a1563e5..2223084  ak-tinkering -> ak-tinkering
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com:khanna-lab/cadre.git'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. If you did not intend to push that branch, you may want to
hint: specify branches to push or set the 'push.default' configuration variable
hint: to 'simple', 'current' or 'upstream' to push only the current branch.

我看到推送成功了,但是我不明白為什么會出現這個錯誤或者它在說什么?

事實上,這是因為使用了舊的 git,版本 1.8.3.1。 我無法在我使用的系統上更新 git,所以我更新了設置配置設置:

git config --global push.default simple

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM