[GIT] git add <path>/ (with trailing slash) -> why this is a bad practice?

Hi All,

What’s the difference in the following commands?
%> git add <path>
%> git add <path>/

I mean what the trailing slash ‘/’ actually does? Why it’s not recommended to use it?

Thank you!

To be honest, I don’t know why it would be considered a bad practice. You should probably ask the people that are telling you that why it is one.

In some simple testing, the only difference that I could detect is that if path is a file and not a directory, if you type git add path/, then it won’t be added. But I didn’t dig really deep, so there could be other differences.