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 7897053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:03:23+00:00 2026-06-03T08:03:23+00:00

On doing git diff –stat some files are listed with full path from repository

  • 0

On doing git diff --stat some files are listed with full path from repository base but some files are listed as:

.../short/path/to/filename.  

That is the path starts with ... and only short path is shown.

I would like git diff to list full file path for all files for it to be easily processed by a script. Is there some way I can get git diff to always show full path

  • 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-03T08:03:25+00:00Added an answer on June 3, 2026 at 8:03 am

    By default git diff truncates its output to fit into a 80-column terminal.

    You can override this by specifying values using the --stat option:

    --stat[=<width>[,<name-width>[,<count>]]]
           Generate a diffstat. You can override the default output width for
           80-column terminal by --stat=<width>. The width of the filename
           part can be controlled by giving another width to it separated by a
           comma. By giving a third parameter <count>, you can limit the
           output to the first <count> lines, followed by ...  if there are
           more.
    
           These parameters can also be set individually with
           --stat-width=<width>, --stat-name-width=<name-width> and
           --stat-count=<count>.
    

    For example, by setting the output value to a very large number:

    git diff --stat=10000
    

    Note that produces the path relative to the root of the git repository.

    (For scripting you might want to use git diff-tree directly since it’s more of a "plumbing" command, although I suspect you’ll be fine either way. Note that you need the same extra text with --stat when using git diff-tree. The essential difference between using the git diff "porcelain" front end, and the git diff-tree plumbing command, is that git diff looks up your configured settings for options like diff.renames to decide whether to do rename detection. Well, that, plus the front end git diff will do the equivalent of git diff-index if you’re comparing a commit with the index, for instance. In other words, git diff reads your config and invokes the right plumbing automatically.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was used to doing git diff | mate but my new machine does
Is there a way to ignore a path(s) when doing git diff? such as
Here is some parts from a diff file generated using git diff HEAD .
I am doing some work to track down a perceived bug in a git
That might be a naive git question but here it is: Before doing a
I was doing some work at home over the weekend and used git to
I've moved files from Project to Project/src . Git is under the impression that
I am tracking a project with git. There are some Xcode project files in
When initialize a new git repository (on Linux/Ubuntu), we use: # What this doing:
A accidentally some changes to my bash configuration I keep in git by doing

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.