سؤال

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