Suppose I create a branch, I make some commits, how do I get the files and the commits changed from the fork ?
Asked
Active
Viewed 1,186 times
1 Answers
5
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":
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.
-
Note that if master has also moved on, you should replace `master` above with the branch-point commit – Useless Mar 06 '13 at 14:13
-
Thank you but is it possible to compare changed files between the beginning and the head of the same branch ? – user1611830 Mar 06 '13 at 14:15
-
@user1611830 that is why I mention `git diff --name-status master...branch`: with three dots, you only get between the beginning and head of your branch. – VonC Mar 06 '13 at 14:17