欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Git發(fā)現(xiàn)git push origin master 報(bào)錯(cuò)的解決方法

 更新時(shí)間:2017年11月02日 11:29:59   作者:Kangvcar  
本篇文章主要介紹了Git發(fā)現(xiàn)git push origin master 報(bào)錯(cuò)的解決方法,小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧

git push origin master 報(bào)錯(cuò)的解決方法,分享給大家,具體如下:

錯(cuò)誤提示如下

[root@linux1 php]# git push -u origin master 
To git@github.com:kangvcar/Results-Systems--PHP.git 
 ! [rejected]  master -> master (fetch first) 
error: failed to push some refs to 'git@github.com:kangvcar/Results-Systems--PHP.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 merge the remote changes (e.g., 
hint: 'git pull') before pushing again. 
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

原因

GitHub遠(yuǎn)程倉庫中的README.md文件不在本地倉庫中。

解決方案1

我們只需加上 -f 參數(shù)即可push成功

[root@linux1 qimo]# git push -f 
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: 53, done. 
 Compressing objects: 100% (53/53), done. 
 Writing objects: 100% (53/53), 1.35 MiB | 55.00 KiB/s, done. 
 Total 53 (delta 8), reused 0 (delta 0) 
 remote: Resolving deltas: 100% (8/8), done. 
 To git@github.com:kangvcar/Results-Systems--PHP.git 
 + fbe05e8...70b187d master -> master (forced update)

解決方案2

我們只需加上 --rebase 參數(shù)然后再重新 push 一次即可

[root@linux1 qimo]# git pull --rebase origin master 
[root@linux1 qimo]# git push -u origin master

以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

  • rsync只同步指定目錄的方法(已測)

    rsync只同步指定目錄的方法(已測)

    今天在配置文件同步的時(shí)候,只需要同步指定目錄,因?yàn)橐恍┠夸浭遣恍枰降亩覕?shù)量比較大,這里簡單分享下–include參數(shù)的使用
    2015-01-01
  • Centos搭建KMS(vlmcsd)激活服務(wù)器的步驟

    Centos搭建KMS(vlmcsd)激活服務(wù)器的步驟

    Kms是微軟官方認(rèn)可的一種系統(tǒng)激活方式,這個(gè)激活方式主要用于企業(yè)批量激活計(jì)算機(jī)的windows和office,這篇文章主要介紹了Centos搭建KMS(vlmcsd)激活服務(wù)器的方法,需要的朋友可以參考下
    2023-07-07
  • CentOS 6.3 Rsync客戶端與Win2003 cwRsyncServer服務(wù)端實(shí)現(xiàn)數(shù)據(jù)同步

    CentOS 6.3 Rsync客戶端與Win2003 cwRsyncServer服務(wù)端實(shí)現(xiàn)數(shù)據(jù)同步

    這篇文章主要介紹了CentOS 6.3 Rsync客戶端與Win2003 cwRsyncServer服務(wù)端實(shí)現(xiàn)數(shù)據(jù)同步,需要的朋友可以參考下
    2015-07-07
  • 微服務(wù)之注冊中心和配置中心Consul詳解

    微服務(wù)之注冊中心和配置中心Consul詳解

    這篇文章主要為大家介紹了微服務(wù) 注冊中心和配置中心Consul選型及基本使用詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪
    2023-04-04
  • web.config(IIS)和.htaccess(Apache)配置

    web.config(IIS)和.htaccess(Apache)配置

    這些是我發(fā)現(xiàn)最有用的片段,/隨時(shí)間推移使用最多的片段。 他們處理諸如從查詢字符串,CORS標(biāo)頭重寫URL以及強(qiáng)制HTTPS重定向之類的事情
    2019-11-11
  • Dell R710 服務(wù)器做Raid0與Raid5磁盤陣列的圖文教程

    Dell R710 服務(wù)器做Raid0與Raid5磁盤陣列的圖文教程

    這篇文章主要介紹了Dell R710 服務(wù)器做Raid0與Raid5磁盤陣列的圖文教程,需要的朋友可以參考下
    2018-05-05
  • nginx/apache/php隱藏http頭部版本信息的實(shí)現(xiàn)方法

    nginx/apache/php隱藏http頭部版本信息的實(shí)現(xiàn)方法

    有時(shí)候我們需要隱藏我們的服務(wù)器版本信息,防止有心人士的研究,更安全,這里介紹下在nginx/apache/php中如何隱藏http頭部版本信息的方法,有需要的朋友參考下吧
    2013-06-06
  • Memcache緩存系統(tǒng)知識點(diǎn)梳理

    Memcache緩存系統(tǒng)知識點(diǎn)梳理

    Memcached是一個(gè)免費(fèi)開源的,高性能的,具有分布式對象的緩存系統(tǒng),它可以用來保存一些經(jīng)常存取的對象或數(shù)據(jù),保存的數(shù)據(jù)像一張巨大的HASH表,該表以Key-value對的方式存在內(nèi)存中
    2012-09-09
  • Ubuntu移動(dòng)任務(wù)欄到底部的實(shí)現(xiàn)方式

    Ubuntu移動(dòng)任務(wù)欄到底部的實(shí)現(xiàn)方式

    在Ubuntu操作系統(tǒng)中,默認(rèn)的任務(wù)欄位置在屏幕左側(cè),本文介紹了兩種方法來將任務(wù)欄移動(dòng)到底部,方法一涉及使用終端命令,可能會出現(xiàn)架構(gòu)不支持的情況,方法二通過設(shè)置界面調(diào)整Dock的位置來實(shí)現(xiàn)任務(wù)欄的移動(dòng),具體步驟包括打開設(shè)置、選擇外觀選項(xiàng)
    2024-09-09
  • 用GitLab搭建自己的私有GitHub庫的步驟

    用GitLab搭建自己的私有GitHub庫的步驟

    本篇文章主要介紹了用GitLab搭建自己的私有GitHub庫的步驟,小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧
    2017-11-11

最新評論