Skip to content

Instantly share code, notes, and snippets.

@zpao
Created October 4, 2010 23:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zpao/610642 to your computer and use it in GitHub Desktop.
Save zpao/610642 to your computer and use it in GitHub Desktop.
git diff `git merge-base HEAD master`
@jbalogh
Copy link

jbalogh commented Oct 5, 2010

Maybe my branches aren't branchy enough, but I get the same output with git diff master.

@zpao
Copy link
Author

zpao commented Oct 5, 2010

So my experience with git diff master is it will actually diff HEAD with master. If you haven't merged master into your branch recently, then the diff will show everything new that's landed in master.

What I wrote should diff against the last merge point, so it creates a patch that I could toss on bugzilla (well almost, I need to strip out the index line)

Then again, I could be doing it wrong. I've not really delved too deeply into git.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment