码迷,mamicode.com
首页 > 其他好文 > 详细

git 检查是否有commit到本地但还没push的代码

时间:2017-04-29 16:22:02      阅读:5430      评论:0      收藏:0      [点我收藏+]

标签:git push   directory   span   为知笔记   int   nothing   status   comm   div   

使用
  1. git status
命令可以得到以下结果
  1. $ git status
  2. On branch dev_getTicketCnt
  3. Your branch is ahead of ‘origin/master‘ by 1 commit.
  4. (use "git push" to publish your local commits)
  5. nothing to commit, working directory clean
这就表示本地库还有没push的内容
如果是以下结果,就表示本地全部都push了,同时表示本地还不是最新的,提示那里都提示你要去远程拿代码合并了
  1. $ git status
  2. On branch dev_activit_grabTicket
  3. Your branch and ‘origin/master‘ have diverged,
  4. and have 1 and 4 different commits each, respectively.
  5. (use "git pull" to merge the remote branch into yours)
  6. nothing to commit, working directory clean

总结:其实git的每条命令之后都有很多提示的,从中可以学到很多其他操作




git 检查是否有commit到本地但还没push的代码

标签:git push   directory   span   为知笔记   int   nothing   status   comm   div   

原文地址:http://www.cnblogs.com/ismallboy/p/6785335.html

(1)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!