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
So:
git diffshows unstaged changes in tracked files (you added the file at some point, but haven’t added these specific changes)git diff --cachedshows 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:
git resetwill empty the staged changes from your index but leave them in your working copy, sogit diffwill give you the complete patch nowgit addthe remaining files to your index: thengit diff --cachedwill give you the complete patch