Suppose I create a branch, I make some commits, how do I get the files and the commits changed from the fork ?

有帮助吗?

解决方案

This would give you the list of modified files between one branch (master for instance) and another:

 git diff --name-status master..branch

But that would take into account the latest modifications from master as well.
If you want the difference between the moment you have branched and the latest of your new branch, then:

 git diff --name-status master...branch

See "git diff doesn't show enough":

diff dots

Similarly, to list just the commits done since you have branch:

git log master..branch

Note that fork is more reserved to cloning (on the server side) and not so much used for branching.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top