Can I get a list of changed files in a git sub-folder between two commits?

I have a git repo containing many folders.
I need to find out what files have changed in one of those folders between two commits.

Is there a nice way of doing this?

  • Git is failing to push in puttycyg because of SSH error
  • Using GIT Bash, ERROR: Repository not found - fatal: Could not read from remote
  • converting git branch to git tag
  • Export git changesets to a closed environment repo
  • Creating a local git mirror from a supergit
  • GIT Extensions - Push - “fatal: The remote end hung up unexpectedly”
  • How to know which commit belongs to which branch
  • Sharing files in different projects to the same folder in HG/Git
  • Can I let git warn me when I try to add a file with a file name which is invalid on Windows?
  • Getting SSL error when attempting to clone a Stash repository
  • Git submodule remote server
  • Removing sensitive data from Git. “fatal: ambiguous argument 'rm'”
  • 3 Solutions collect form web for “Can I get a list of changed files in a git sub-folder between two commits?”

    I think you can just stick the path at the end of git diff.

    git diff HEAD^ HEAD special_folder/
    

    git diff has an option to do just what you want

    git diff --name-status OLD NEW.
    

    There are several options to get just what you want:

    git diff --stat OLD NEW.     #show graphically how much changed.
    git diff --numstat OLD NEW.  #show numerically how much changed.
    

    You might also want to consider: -M to show renames and -C to show copies.

    I believe the nicest way to do it is to use git-gui.

    I’m using a rather old version, but here’s what works for me: Select “visualize all branch history” from the Repository menu, and select the later of the two commits on the nice graphical pane in the upper left.

    The other panes should display all kinds of information on what changed in that checkin, to just about any level of detail a developer could want.

    To see for a particular folder, go to the pane in the lower right, select the Patch button (to get rid of unchanged stuff) and navigate down to the folder you are interested in. You can select individual changed files to view the diffs in the pane on the lower left.

    Git Baby is a git and github fan, let's start git clone.