Using Git how do I find changes between local and remote

前端 未结 11 1276
感情败类
感情败类 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:32

    When you do git fetch, all the contents including branches,tags ( refs) are stored temporarily in .git/FETCH_HEAD whose content can be viewed with command: git log FETCH_HEAD If you don't use suffix -a with git fetch then by default, FETCH_HEAD's content's will be overwritten by new contents. From these contents, you can view and decide to which branch you want to merge them if you do or you can simple cherry-pick if you want only a few commits from what has been brought by fetch.

提交回复
热议问题