2

Anyone know how to test if mybranch-working, a local branch, is a direct descendant of an origin/staging branch. In other words, I would like to test if another developer has merged there changes into origin/staging since I last merged from origin/staging into mybranch-working.

Jon Boehm
  • 41
  • 1
  • 3

1 Answers1

0

You can use the 'double-dot' syntax:

git log mybranch-working..origin/staging

This shows you all commits that are in origin/staging but are not in mybranch-working.

This command is a shorthand for:

git log ^mybranch-working origin/staging

In fact you can specify more than two references. An alternative to ^ is --not:

git log master ^topicA --not topicB
simich
  • 358
  • 3
  • 10