Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8767083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:43:06+00:00 2026-06-13T16:43:06+00:00

Very similar question as this one: Export only modified and added files with folder

  • 0

Very similar question as this one: Export only modified and added files with folder structure in Git

The given answer only seems to output the files changed in the given commit ($commit_id):

git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT $commit_id

I’d like to get the list of modified files between commit1 and commit2… Is this possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T16:43:08+00:00Added an answer on June 13, 2026 at 4:43 pm

    You should just be able to use the commit IDs. For example:

    git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT 218d182e 3ef44d29d
    

    If you want to include the changes in commit 3ef44d29d then you need to specify its parent either by ID or with 3ef44d29d^.

    Here are some examples, from one of my own projects. Going backwards in history, I have the following commits:

    1a443
    fb4ae
    88226
    c46ba
    

    I get the following output from various commands:

    $ git diff-tree -r --name-only 1a443
    1a443831fa9f797fedb397e900bd3d45e2093ea6
    public/customers.en.html
    $ git diff-tree -r --name-only fb4ae
    fb4ae4af0ac473b8547ec1717d4b4172c0d634f4
    public/checkout.en.html
    $ git diff-tree -r --name-only 88226
    88226fec6f1082b1dffd266d3e1bd0dc38cca520
    public/finish.en.html
    $ git diff-tree -r --name-only c46bac
    c46bacddee7785599c2f026f53cd93357e8ad30d
    public/index.php
    

    I can get all the changes between c46bac and 1a443 easily enough:

    $ git diff-tree -r --name-only c46bac 1a443
    public/checkout.en.html
    public/customers.en.html
    public/finish.en.html
    

    But notice that it doesn’t include the change to public/index.php in commit c46bac. What we really want is to use the parent of that commit as our starting point for comparison.

    $ git diff-tree -r --name-only c46bac^ 1a443
    public/checkout.en.html
    public/customers.en.html
    public/finish.en.html
    public/index.php
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question is very similar to this one . However, the accepted answer (and
I have a question very similar to this one but the answer does not
My question is very similar to this one on SO, only it doesn't exactly
My question popped up a very similar question, this one . But the accepted
I have a similar question to this one : It's very easy in py-amqp/flopsy
I have an error very similar to the one addressed in this question .
Firstly, I realise that this is a very similar question to this one: Which
I know this question is very similar to this one: Symmetric cross join and
I'm asking a question very similar to this one —dare I say identical? An
My question is very similar to this one . The application I'm developing is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.