adamtornhill / code-maat

A command line tool to mine and analyze data from version-control systems
http://www.adamtornhill.com/code/codemaat.htm
2.37k stars 218 forks source link

Exclusion of folder inside Repository #60

Closed velanbabu closed 5 years ago

velanbabu commented 5 years ago

how to exclude certain folders inside repository during generation of the log?

adamtornhill commented 5 years ago

In case of Git, it uses pathspecs to limit paths on the command line. To give you an example, let's say I want to exclude everything in my vendor/ folder. I would then use the following pattern:

git log --numstat -- . ":(exclude)vendor/*"

Note that you would need to add the other options required by Code Maat too. Other version-control systems might have a similar concept, but I'm less familiar with them.

Does this help?

velanbabu commented 5 years ago

Great. Its work. This might be useful for others. If we want to exclude more than a folder below syntax git log --numstat -- . ":(exclude)vendor/" ":(exclude)test/" > output.log Please close the issue. Thanks once again.