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

  • Home
  • SEARCH
  • 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 1020281
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:08:39+00:00 2026-05-16T11:08:39+00:00

I presume this is a configuration error somewhere, but I can’t figure out where.

  • 0

I presume this is a configuration error somewhere, but I can’t figure out where. Regular git commands appear to work fine, but “git diff” does nothing. To be safe, I removed external diff tools from my .gitconfig file. This was installed via MacPorts and is the lates version (1.7.2.2).

What I see is that when I run “git diff” from my workspace, it simply exits, doing nothing.

$ git --version
git version 1.7.2.2
$ git diff
$ 

If I back up one directory, out of my root workspace, typing “git diff” gives me this:

$ git diff
usage: git diff [--no-index] <path> <path>

This may be expected behavior since I’m not under a git repository.

Any ideas on what I can do to troubleshoot this?

  • 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-05-16T11:08:39+00:00Added an answer on May 16, 2026 at 11:08 am

    The default output for git diff is the list of changes which have not been committed / added to the index. If there are no changes, then there is no output.

    git diff [–options] [–] […]

    This form is to view the changes you made relative to the index (staging area for the next commit). In other words, the differences are what you could tell git to further add to the index but you still haven’t.

    See the documentation for more details. In particular, scroll down to the examples, and read this section:

    $ git diff            # (1)
    $ git diff --cached   # (2)
    $ git diff HEAD       # (3)
    
    1. Diff the working copy with the index
    2. Diff the index with HEAD
    3. Diff the working copy with HEAD

    Outside your workspace, as you guessed, git won’t know what to diff, so you have to explicitly specify two paths to compare, hence the usage message.

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

Sidebar

Related Questions

I can't see this in the docs, but I presume it's a solved problem.
I'm having a bit of trouble figuring this out so if you can help
I am trying to work out the best configuration for my Zend Session Namespaces.
I have a curl class, called Curl. Let's presume i have this code: $url
I know this is possible to be done using javascript, and I presume I
This is probably really stupid of me but how do I start google navigation
I have been tearing my hair out over this for about 3 hours, please
So I presume this is a memory issue, here's the code: - (NSString *)giveMeAStringGoddammit
I'm not entirely sure if this is the right place for this question, but
I presume this isn't a common problem, which makes it a bit more difficult

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.