如何检查我要提交的内容? [英] How to check what I'm going to commit?

查看:190
本文介绍了如何检查我要提交的内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Git开发一些功能。在两者之间我有一些紧急的bug,因此需要从 feature / 2.8.0 开启 develop branch 。为此,我运行以下命令(从shell历史记录中):

I was working on some feature development using Git. In between I have got some urgent bug, so needed to switch on develop branch from feature/2.8.0. So to do that I run following commands (from shell history):

 2002  git status 
 2003  git stash 
 2004  git checkout develop 
 2005  git status 
 2006  git pull
 2007  git pull origin develop

现在,我的 git status

$ git status
# On branch develop
# Your branch is ahead of 'origin/develop' by 1 commit.
#   (use "git push" to publish your local commits)
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#   src/lib/eval/prvl_listed_securities_0000_hxx0401_init.erl
#   src/lib/eval/prvl_listed_securities_0000_hxx0401_proc.erl
#   src/view/eval/prvl_listed_securities_0000_hxx0401.html
nothing added to commit but untracked files present (use "git add" to track)

在这里,我可以看到以下几行:

Here, I can see following lines :

>    # On branch develop
>    # Your branch is ahead of 'origin/develop' by 1 commit.
>    #   (use "git push" to publish your local commits)

从历史记录来看,什么,如何检查我的本地提交需要推送什么?

From history, I haven't committed anything, How can I check what are my local commits needs to push?

推荐答案

尝试:
git show HEAD
显示当前头部提交的内容

Try: git show HEAD This shows the content of the commit from your current head

这篇关于如何检查我要提交的内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆