git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Diff topic branch + working copy changes?

From
RDRobert Dailey <rcdailey.lists@gmail.com>
Date
May 16, 2017, 19:31 UTC
Message-ID
<CAHd499ADTbO09OJhH_wWBbAcXZeLRLFAqOw5eTe6=abN-JUrUA@mail.gmail.com>

So for a topic branch based on master, I can diff ONLY my changes on the topic branch by doing this simple command:

$ git diff origin/master...

However, this does not include uncommitted working copy changes. To work around this, I can do this instead:

$ git diff origin/master
(No three-dot notation above)

However this implies a ".." notation which will include changes on master that have been made after I branched my topic (I use three-dot to exclude those).

Is there a way I can do the first diff but also include working copy changes? The reason I'm wanting to do this is because with difftool in particular I like to make changes on the "right" side of each diff and have those changes carry over to my working copy as edits I can commit. This doesn't always work, especially if those same files are already modified in my working copy but not committed.

Next: Junio C Hamano
Message 1 of 5 in “Diff topic branch + working copy changes?”
  1. Robert DaileyMay 16, 2017
  2. Junio C HamanoMay 17, 2017
  3. Robert DaileyMay 17, 2017
  4. Robert DaileyMay 17, 2017
  5. Samuel LijinMay 17, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.