.    commit之后,用git status,打印信息为:

# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
nothing to commit (working directory clean)

说明没有文件需要commit,但是本地仓库 有一个commit ahead原来的master,就是本地仓库有一个提交,比远程仓库要先进一个commit。

You get that message because you made changes
in your local master and you didn’t push them to remote. You have several ways
to “solve” it and it normally depends on how your workflow looks like:

  • If you work in another
    way and your local changes should be pushed then just

git push origin

  • 1

assuming origin is your remote

  • If your local changes
    are bad then just remove them or reset your local master to the state on remote

git reset --hard origin/master

Git报错:Your branch is ahead of 'origin/master' by 1 commit的更多相关文章

  1. git status message - Your branch is ahead of origin/master by X commits

    git reset --hard origin/master git status FAQ: When I issue the "git status" command, I se ...

  2. Your branch is ahead of 'origin/master' by 1 commit.

    git reset HEAD^ --soft git reset HEAD^ --hard --soft 表示保留当前commit,重新commit --hard 表示丢弃当前add,重新add.co ...

  3. Your branch is ahead of 'origin/master' by 21 commits.

    当切换到主分支后,准备 git pull 拉取远程 master 分支时,提示本地主分支显示有 21 个commits 问题原因: 因为你修改了 local master 本地的主分支,可以选择以下方 ...

  4. Git Your branch is ahead of 'origin/master' by X commits解决方法

    (1)方法1:git fetch origin (2)方法2(代码还需要):git push origin (3)方法3 (代码不需要):git reset --hard origin/$branch ...

  5. Your branch is ahead of 'origin/master' by 2 commits.

    遇到这种问题,表示在你之前已经有2个commit而没有push到远程分支上,所以需要先git push origin **将本地分支提到远程仓库.也可以直接git reset --hard HEAD~ ...

  6. Git报错:Your branch is up to date with 'origin/master'.

    Git在提交的时候报错 Your branch is up to date with 'origin/master'. 报错 Your branch is up to date with 'origi ...

  7. git报错:'fatal:remote origin already exists

    git报错:'fatal:remote origin already exists'怎么处理?附上git常用操作以及说明.   git添加远程库的时候有可能出现如下的错误, 怎么解决? 只要两步: 1 ...

  8. Updates were rejected because the remote contains work that you do(git报错解决方案)

    Updates were rejected because the remote contains work that you do(git报错解决方案) 今天向GitHub远程仓库提交本地项目文件时 ...

  9. Git报错 bad numeric config value '100000' for 'pack.windowmemory': out of range

    Git报错 bad numeric config value '10240M' for 'pack.windowmemory': out of range $ git config --edit -- ...

随机推荐

  1. UI(一)

    1.AfxWinMain 首先,MFC程序先执行到TheApp实例化对象也就是通过这句CTestApp the App来实例化对象的然后,调用CTestApp构造函数分配内存空间 然后,就调用了Afx ...

  2. 自定义shell命令--闪烁的字母(PIL实现)

    之前看到shell命令行,有人写过漫天下字母的cmatrix,想自己动手用python写一个类似,但是比较有自己风格的shell屏保 大致效果如下: 制作这个的大体思路比较简单: 1.利用python ...

  3. Scala学习——Brief Scala Tutorial

    因为Spark项目需要,学习Scala编程. 从官网文档入手:http://www.scala-lang.org/documentation/ 首先从他的Older Documentation入手. ...

  4. 2.2 IPython基础

    2.2 IPython基础 1 Running the IPython Shell (运行IPython Shell) 可以通过命令行启动IPython,就像启动标准的Python解释器一样,直接在t ...

  5. swift的enum模式—对Alamofire入口的解析--数据结构与操作结合的模式

    swift的枚举模式是数据结构与操作结合的模式 1.enum本质是一个类型,可以定义变量: 它定义的变量可以用到其它变量用的的任何地方:函数的输入.输出.成员变量.临时变量等: 这个变量还可以带有附加 ...

  6. [整理记录备忘]oracle数据库相关问题与解决

    检查死锁方式 用dba用户执行以下语句,可以查看到被死锁的语句. select sql_text from v$sql where hash_value in (select sql_hash_val ...

  7. Carthage 的使用

    第一步,当然是安装 Carthage,网上找吧 第二步,找到你要用的那个仓库,eg:https://github.com/jiutianhuanpei/SHBPlayer 第三步,cd 到工程根目录下 ...

  8. 第8章 自己写库-构建库函数雏形—零死角玩转STM32-F429系列

    第8章     自己写库—构建库函数雏形 全套200集视频教程和1000页PDF教程请到秉火论坛下载:www.firebbs.cn 野火视频教程优酷观看网址:http://i.youku.com/fi ...

  9. fio是如何运行的?

    本文主要介绍fio是如何运行的,并且以单线程.单job为例 fio的入口在fio.c中的main函数,下面列出了main函数,此处只出示了一些调用的关键函数 int main(int argc, ch ...

  10. js 继承的几种方式

    JS继承的实现方式: 既然要实现继承,那么首先我们得有一个父类,代码如下: function Animal(name) { // 属性 this.name = name || '小白'; // 实例方 ...