使用git push直接推送未关联分支的时候,出现如下提示:

$ git push
Counting objects: 46, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 761 bytes | 0 bytes/s, done.
Total 7 (delta 5), reused 0 (delta 0)
remote: Resolving deltas: 100% (5/5)
remote: Processing changes: refs: 1, done
To ssh://yiyangzhang@code.ctripcorp.com:29418/UED/Flight/UED.Flight.online
b74697a..8408b72 giftReplaceCoupons -> giftReplaceCoupons
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'ssh://yiyangzhang@code.ctripcorp.com:29418/UED/Flight/UED.Flight.online'
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.

  然后运行 git status 的时候,出现如下提示:

$ git status
On branch giftReplaceCoupons
Your branch is up-to-date with 'origin/giftReplaceCoupons'. It took 2.27 seconds to enumerate untracked files. 'status -uno'
may speed it up, but you have to be careful not to forget to add
new files yourself (see 'git help status').
nothing to commit, working directory clean

  

使用git push指定远程仓库的时候,提示如下:

$ git push origin master
Counting objects: 53, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (8/8), 764 bytes | 0 bytes/s, done.
Total 8 (delta 6), reused 0 (delta 0)
remote: Resolving deltas: 100% (6/6)
remote: Processing changes: refs: 1, done
To ssh://yiyangzhang@code.ctripcorp.com:29418/UED/Flight/UED.Flight.online
2507930..477a26e master -> master

  

git push的更多相关文章

  1. 执行git push出现"Everything up-to-date"

    在github上git clone一个项目,在里面创建一个目录,然后git push的时候,出现报错"Everything up-to-date" 原因:1)没有git add . ...

  2. git push不用重复输入用户名和密码(解决方案)

    每次git push都要输入用户名和密码,有点麻烦,就上网搜了下解决方案. 网上的解决方案有的讲得不清晰,逐个试了后,总结下两种有效的解决方案.   方案一: 1.在计算机安装盘(即一般为C盘)下找到 ...

  3. git push 报错!!!!

    [root@NB sh]# git push To git@x0.xx.xxx.x1:yanjing_chenl/IT-DOC.git ! [rejected] master -> master ...

  4. git push如何至两个git仓库

    分别有仓库 A(github),B(JAE 的 git),本机为C. 假设以 a 仓库作为最终的使用仓库, b为发布仓库.分支都为 dev 第一步,增加远程仓库 git remote add orig ...

  5. git push :推送本地更改到远程仓库的三种模式

    摘要:由于在git push过程中,no-fast-forward 的push会被拒绝,如何解决git push失败的问题?这里面有三种方法,分别会形成merge形式的提交历史,线性形式的提交历史,覆 ...

  6. git push免输入账号和密码方法

    最近在做些oj,所以需要频繁的git push提交代码,每次都要输入帐号和密码,感觉不舒服,于是乎就做了如下设置,然后就可以开心的提交啦- Linux或者Mac下方法: 创建文件,进入文件,输入内容: ...

  7. git push命令

    git push命令用于将本地分支的更新,推送到远程主机.它的格式与git pull命令相仿. $ git push <远程主机名> <本地分支名>:<远程分支名> ...

  8. git push error: A Contributor Agreement must be completed before uploading

    因为是从官方版本库做的镜像,所以有些权限直接从官方同步到了本地. 今天,有同事执行git push操作,报错: 根据网上搜索的内容,在gerrit.config中[auth]中添加如下内容: [aut ...

  9. git push --help

    git-push(1) Manual Page NAME git-push - Update remote refs along with associated objects SYNOPSIS gi ...

  10. git push上传代码到gitlab上,报错401或403

    之前部署的gitlab代码托管平台,采用ssh方式连接gitlab,在客户机上产生公钥上传到gitlab的SSH-Keys里,则git clone下载和git push上传都没问题,这种方式很安全. ...

随机推荐

  1. cocos2dx中的CCRect的用法

    CCRect是cocos2dx中的一块矩形区域 常用于碰撞检测及渲染时限定纹理的大小 CCRect rect=spr.boundingBox(); CCRect rect=CCRect(0,0,spr ...

  2. 给同一个表中的两个外键写sql

    一个表有两个外键都指向另一个表的主键时,如何检索他们的数据? 例如,表TableA有两个列,puserID和friendID. 表TableB有两个列,userID和userName. 我们怎样检索数 ...

  3. HTTP请求报文与响应报文

    http://docs.telerik.com/fiddler/KnowledgeBase/HTTP HTTP请求报文与响应报文 HTTP http://www.w3.org/Protocols/rf ...

  4. httpsClient

    Http协议的重要性相信不用我多说了,HttpClient相比传统JDK自带的URLConnection,增加了易用性和灵活性(具体区别,日后我们再讨论),它不仅是客户端发送Http请求变得容易,而且 ...

  5. [转载]实战Linux下VMware虚拟机根目录空间扩充

    [转载]实战Linux下VMware虚拟机根目录空间扩充 (2011-07-31 21:34:34) 转载▼ 标签: 转载   原文地址:实战Linux下VMware虚拟机根目录空间扩充作者:shar ...

  6. java基础知识回顾之---java String final类普通方法的应用之“两个字符串中最大相同的子串”

    /* * 3,两个字符串中最大相同的子串. * "qwerabcdtyuiop" * "xcabcdvbn" *  * 思路: * 1,既然取得是最大子串,先看 ...

  7. ElasticSearch小操之Marvel,Sense

    慢慢弄弄,说不好马上就要用呢,,, 嘿嘿 参考网址: http://es.xiaoleilu.com/ Elasticsearch 权威指南(中文版) 阅读地址:Elasticsearch权威指南(中 ...

  8. [Hibernate]dynamic-insert和dynamic-update属性

    这二个属性默认情况均为false,你可以通过以下二种方式进行配置使用: 1.Annotation @Entity @Table(name = "stock_transaction" ...

  9. 在sklearn上读取人脸数据集保存图片到本地

    程序如下: # -*- coding: utf-8 -*- """ Created on Sat Oct 31 17:36:56 2015 ""&qu ...

  10. 【Linux高频命令专题(9)】ls

    ls命令是linux下最常用的命令.ls命令就是list的缩写缺省下ls用来打印出当前目录的清单如果ls指定其他目录那么就会显示指定目录里的文件及文件夹清单. 通过ls 命令不仅可以查看linu ...