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 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:
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 nowgit add the remaining files to your index: then git diff --cached will give you the complete patchIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With