Search code examples
gitgit-branchgit-history

Get list of all edited files since branching


I'd like to get a list of edited files since branching from my master branch (not comparing to the most recent head of master branch, but master at the point of branching).

Is this possible?

This seems like it'd be a pretty common thing to want to do, but my colleagues didn't know of git command for this, and didn't find anything online (it's kinda hard to google i guess).


Solution

  • Assuming you are on the branch now, and the master branch is called master, you would say

    git diff --name-only master...  
    

    The three dots cause the comparison to be with the point where you branched from master, and the diff --name-only lists filenames only.


    Footnote

    Some good Stack Overflow bookmarks to keep on hand are:

    The dot-notation means different things in different contexts (notably, it works differently in diff from how it works in log), so it can be annoyingly tricky to remember.