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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:16:48+00:00 2026-06-14T00:16:48+00:00

How do I see the difference between a local file (in Master) and the

  • 0

How do I see the difference between a local file (in Master) and the same file in the remote repository (origin) in git? When I do a git fetch origin and then do a git diff master origin/master. It shows me a huge list of changes, which is not really helpful for a lot of java files.

  • 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-14T00:16:49+00:00Added an answer on June 14, 2026 at 12:16 am

    git diff master origin/master -- file/to/compare

    The -- is a convention that many programs use; it indicates that any parameters after it are not to be considered options, even if they start with a hyphen. Git extends this convention and uses -- to indicate that the following parameters are files (and not branches or other refs, whose names may overlap with file names).

    Actually, I believe the -- is optional as long as you do not use file names which also exist as branches etc., but it’s easier to always use it.

    Also see the git diff manpage. The “–” convention is explained in this question:
    Deleting a badly named git branch

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

Sidebar

Related Questions

How can I see the differences in a designated file between a local branch
Could someone tell me the difference between javadoc @see and {@link} ? Or rather,
What's the difference between @{property} and ${property} in accessing Ant properties? Didn't see any
I see CActiveDataProvider used in the controller actionIndex() function. Is there any difference between
What is the difference between a space and a slash when running git commands?
see also Differences between LINQ to Objects and LINQ to SQL queries We are
What is a good tool to see the differences between 2 tables (or even
I was creating a stored procedure and I see some differences between my methodology
Why do I see a difference when I convert a unix timestamp to datetime
I dont really understand whats going on and cant see the difference: I'm downloaded

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.