Today I Learned
by OneCode

Useful Git flag

During my typical day, I work a lot with Git. Sometimes, when I do a big refactoring, I would like to check what files were modified.

Mostly, the file name is enough; I do not have to check all changes. To achieve this, you have to add --name-only flag to the git diff command:

git diff --name-only

As a result, you will get the list of modified files.

Enjoy!