When I try to dump differences between two folders with
git diff --no-index --name-only folder1 folder2 > diff.txt
I encounter a lot of /dev/null strings. It shows the removed folders as far as I know. But I don't need those in my file. How can I prevent it from dumping?
Check if you can add the --diff-filter=d option, to exclude deleted paths
git diff --no-index --name-only --diff-filter=d folder1 folder2
You can use the option -D aka --irreversible-delete (manual page). It will not show the content of deleted files, but still show that the file was deleted.
If 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