git diff ignore spaces and tabs 1

git diff ignore spaces and tabs

git diff -w

Here is what the above code is Doing:
1. We’re using the git command to run the diff command.
2. We’re using the -w flag to ignore whitespace.
3. We’re using the -U0 flag to tell git to not show any context lines.
4. We’re using the -b flag to ignore changes in the amount of whitespace.
5. We’re using the -B flag to ignore changes whose lines are all blank.
6. We’re using the -w flag to ignore all whitespace.
7. We’re using the -x flag to tell git to use the following regex to determine what files to include in the diff.
8. We’re using the — ‘:!vendor/’ regex to tell git to include all files except those in the vendor directory.

Similar Posts