git 如何知道有没有提交到远程?那些文件没有提交到远程?


git可以使用


 git status

来查看那些文件没有提交 commit,但是如何查看哪些文件没有提交push到远程?

版本控制 git

9Crimes 10 years, 10 months ago

「哪些文件没有提交push到远程」——git status 说明哪些文件 没有提交 。要看哪些 提交 在远程不存在,可以试试这个命令,看哪些提交在哪些分支上有(而另外的分支上没有):


 git show-branch -a --color=always

4646454 answered 10 years, 10 months ago

git status查看当前文件状态

clouder answered 10 years, 10 months ago

git status 里不是有嘛:


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

nothing to commit, working directory clean

Alvinwx answered 10 years, 10 months ago

只要提交过commit后, 当你push的时候自然就会push到远程了吧.
唯一要区分的是有没有push过而已

泡泡Ж忍者 answered 10 years, 10 months ago

推荐你用 Source Tree ,对Git整个分布式流程一目了然,同时也能解决题主在本题中的要求。
Atlassian出的敏捷开发工具异常好用,Source Tree是代表作之一。

哥,你懂得 answered 10 years, 10 months ago

Your Answer