您的位置:首页 > 编程语言

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

2017-04-29 15:30 369 查看
使用
git status

[/code]命令可以得到以下结果
$ git status

On branch dev_getTicketCnt

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

(use "git push" to publish your local commits)

nothing to commit, working directory clean

[/code]这就表示本地库还有没push的内容如果是以下结果,就表示本地全部都push了,同时表示本地还不是最新的,提示那里都提示你要去远程拿代码合并了
$ git status

On branch dev_activit_grabTicket

Your branch and 'origin/master' have diverged,

and have 1 and 4 different commits each, respectively.

(use "git pull" to merge the remote branch into yours)

nothing to commit, working directory clean

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

来自为知笔记(Wiz)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐