0

I have my develop branch which has already been merged with my feature/fix branch. My develop has more feature branches already merged and is ahead of the feature/fix with a lot of commits.

How could I get git to show me only the LINES of code in the FILES that feature/fix has but develop doesn't have. I don't want to show what develop has and feature/fix doesn't have.

mridt
  • 21
  • 3
  • 1
    Look at this GIT cheat sheet : https://gist.github.com/hofmannsven/6814451 Check out how to compare branches, I think that should be a solution to your problem. – Rann Lifshitz Apr 03 '18 at 10:26
  • can't see how this would help me @RannLifshitz . none of those lines under "compare" exclude differences on one side. Thanks – mridt Apr 03 '18 at 10:37
  • 1
    How about this thread from SO? https://stackoverflow.com/questions/13965391/how-do-i-see-the-commit-differences-between-branches-in-git – Rann Lifshitz Apr 03 '18 at 11:34
  • When you say "only the lines", do you mean "only the commits"? – Marinos An Apr 03 '18 at 11:38
  • nope, i mean lines in files @MarinosAn – mridt Apr 03 '18 at 12:03
  • But still it is a little vague. Is it: "print all the lines of files(that exist only in `feature/fix`)" OR "print only lines that exist only in file versions of `feature/fix`"? I have an answer for both. – Marinos An Apr 03 '18 at 14:15

1 Answers1

0

This will show you all the commits that feature/fix has but develop does not have.

git log develop..feature/fix

Be aware that the output might be different than:

git log origin/develop..origin/feature/fix

For the latter command make sure you have performed git fetch first.

Marinos An
  • 9,481
  • 6
  • 63
  • 96