.    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. [咸恩静][Good Bye]

    歌词来源:http://music.163.com/#/song?id=35437298 作曲 : 安英民 [作曲 : 安英民] 作词 : 安英民/로코 [作词 : 安英民/lo-Ko] 나를 떠나버 ...

  2. oracle 禁用/启动job

    注意:dbms_job只能在job的所在用户使用,如果broken其它用户的job用dbms_ijob dbms_job只能在当期用户内创建job.修改和删除job,不能对其他用户的job进行操作;s ...

  3. 2018 - 2019 CTU Open Contest E. Locker Room 【后缀数组】

    任意门:http://codeforces.com/gym/101954/problem/E E. Locker Room time limit per test 2.0 s memory limit ...

  4. c++版 nms

    目前这个代码运行会报一些错误,还要再修改修改才行 #include<iostream> #include<vector> #include<algorithm> # ...

  5. Python spli指定多个分隔符

    #!/usr/bin/python # -*- coding: UTF-8 -*- import re a='Beautiful, is; better*than\nugly' 以竖线"|& ...

  6. kaggle _Titanic: Machine Learning from Disaster

    A Data Science Framework: To Achieve 99% Accuracy https://www.kaggle.com/ldfreeman3/a-data-science-f ...

  7. C++网络爬虫的实现——WinSock编程

    写了一个网络爬虫,可以抓取网上的图片. 需要给定初始网站即可. 在vs2010中编译通过. 需要使用多字节字符集进行编译, vs2010默认的是Unicode字符集. 编译后,运行即可,有惊喜哦!!! ...

  8. 【nodeJs】nodejs

    node.js

  9. 【OC底层】AssociatedObject 关联对象

    如何实现给分类“添加成员变量”? 默认情况下,因为分类底层结构的限制,不能添加成员变量到分类中.但可以通过关联对象来间接实现 关联对象提供了以下API 1> 添加关联对象 void objc_s ...

  10. Flask租房项目总结

    该Flask项目历时3天,开发小组6人,目的是开发一个租房web项目,该项目采用前后端分离模式. Flask租房项目总结 分析需求文档,需要完成的功能模块有: 登陆注册 首页展示,首页搜索 详情展示, ...