From these two folders and their subfolders, I want to exclude all folders named .git from the comparison made by git diff.
On other similar topics there are solutions in which there is only the exclude syntax but there are no two comparison folders and if I try to use this syntax, assuming folder_orig and folder_dest are both in home directory ~ and my current directory is home directory ~:
git diff --no-index folder_orig folder_dest ':!.git' > file.patch
Or this syntax:
git diff --no-index folder_orig folder_dest :^.git > file.patch
Or also this syntax:
git diff --no-index folder_orig folder_dest -- . :^.git > file.patch
It just shows me the command help with no explicit error messages.
I misunderstood the solution provided by the topic: Exclude a directory from git diff
with a syntax that I can't understand:
git diff previous_release..current_release -- . :^spec
?