Using Git how do I find changes between local and remote

前端 未结 11 1277
感情败类
感情败类 2020-11-29 15:16

Here are two different questions but I think they are related.

  1. When using Git, how do I find which changes I have committed locally, but haven\'t yet pushed

11条回答
  •  一整个雨季
    2020-11-29 15:31

    1. Use "git log origin..HEAD"

    2. Use "git fetch" followed by "git log HEAD..origin". You can cherry-pick individual commits using the listed commit ids.

    The above assumes, of course, that "origin" is the name of your remote tracking branch (which it is if you've used clone with default options).

提交回复
热议问题