使用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. thinkphp对数据库操作有哪些内置函数

    getModelName() 获取当前Model的名称 getTableName() 获取当前Model的数据表名称 switchModel(type,vars=array()) 动态切换模型 tab ...

  2. ASP.NET Web – 状态管理

    状态类型 客户端或服务器资源 有效时间 ViewState 客户端 只在一个页面中 Cookie 客户端 关闭浏览器时会删除临时cookie,永久cookie存储在客户系统的磁盘上 Session 服 ...

  3. DB天气app冲刺二阶段第五天

    昨天什么事情也没做..看了一场哆啦a梦 所以就不算冲刺了.. 今天主要就是做了一下需要用到的图片的整理还有的就是UI主界面需要展示用的素材,发现好多东西都需要搜索半天,虽然这个不是什么技术活..但真的 ...

  4. 2878: [Noi2012]迷失游乐园 - BZOJ

    Description 放假了,小Z觉得呆在家里特别无聊,于是决定一个人去游乐园玩.进入游乐园后,小Z看了看游乐园的地图,发现可以将游乐园抽象成有n个景点.m条道路的无向连通图,且该图中至多有一个环( ...

  5. UVA 1175 Ladies' Choice 稳定婚姻问题

    题目链接: 题目 Ladies' Choice Time Limit: 6000MS Memory Limit: Unknown 64bit IO Format: %lld & %llu 问题 ...

  6. Linux 命令整理 —— 基本操作

    1.ls 目录列举(dir) 一般我们这么写: ls 列举当前目录的所有文件,如果文件很多的话,这么看很复杂.我们可以加关键字,例如我们要看包含xml的全部文件. ls *xml* 如果这个时候,我们 ...

  7. 【tarjan】BZOJ 1051:受欢迎的牛

    1051: [HAOI2006]受欢迎的牛 Time Limit: 10 Sec  Memory Limit: 162 MBSubmit: 3134  Solved: 1642[Submit][Sta ...

  8. jsp的常用指令有哪些(编译指令/动作指令整理)

    jsp的常用指令有哪些(编译指令/动作指令整理) JSP动作指令 JSP - JSP中的脚本.指令.动作和注释

  9. spring测试父类,使用junit-4.4.jar,spring-test.jar

    @ContextConfiguration(locations = "classpath:conf/applicationContext.xml") @RunWith(Spring ...

  10. HDU 1087 Super Jumping! Jumping! Jumping!(最长上升子序列,dp)

    以下引用自:http://www.cnblogs.com/Lyush/archive/2011/08/31/2161314.html沐阳 该题可以算是一道经典的DP题了,题中数据是这样的.以 3 1 ...