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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:39:09+00:00 2026-05-23T13:39:09+00:00

In a git repo, I had new file additions , file removal/renames with modifications

  • 0

In a git repo, I had new file additions, file removal/renames with
modifications as usual. When I took a git diff to patch in another
view, I did not get all the new/removed files. Then I tried with
--cached option, then, I got some different file set, but still,
not the complete set of all changes + file additions and removals.
(I had done a git add and git rm)
I also tried --diff-filter=ACDMRTUXB, still didnt help!
Am I missing some other option ? all I want is to get the full set of
diffs in 1 command.
I have git version 1.6.2.4 on my Linux machine.

—

TIA

  • 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-23T13:39:09+00:00Added an answer on May 23, 2026 at 1:39 pm

    So:

    • git diff shows unstaged changes in tracked files (you added the file at some point, but haven’t added these specific changes)
    • git diff --cached shows staged changes (ones you’ve already added)

    It sounds like you have a mixture of staged and unstaged changes in your working copy. If you want to get them all into the same patch, you can either:

    • unstage your changes: git reset will empty the staged changes from your index but leave them in your working copy, so git diff will give you the complete patch now
    • stage all the changes: just git add the remaining files to your index: then git diff --cached will give you the complete patch
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a project that's using git. When I received the repo, it had
I want to make changes to a file in my repo, then force git
I have created a git repo in a folder that had spaces and some
I can successfully run git filter-branch on some code to e.g. merge another repo
I has downloaded a large avi file. I had downloaded it to a git
I have a git repo hosted on my server using gitosis. I had branches
Possible Duplicate: Restore a deleted file in a Git repo I have two branches
I had the same question as asked here: New git repository in root directory
My git repo contains sensitive passwords which, for reasons out of my control, can't
Recently I made a git repo out of directory that already contained two git

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.