【发布时间】:2013-07-10 13:31:20
【问题描述】:
通常,当工作目录干净时,我可以使用“git status”。输出如下:
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
nothing to commit (working directory clean)
但是,如果工作目录被修改,“git status”输出:
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: body/chap1.tex
#
no changes added to commit (use "git add" and/or "git commit -a")
第二个结果没有显示我是否已将所有更改推送到远程分支。有时,当工作目录被修改时,我仍然想要第一个结果。这种情况下怎么弄?
【问题讨论】:
标签: git git-remote remote-branch