When you use a wildcard * , it will be expanded by your shell on Unix systems. So running git add assets/* is the equivalent of explicitly adding files below assets/avatars .
For example, if I have two files:
assets/file1.txt assets/avatars/file2.txt
Then running git add assets/* expands to:
git add assets/file1.txt assets/avatars/file2.txt
So git complains that you are instructing it to add an ignored file. If you want to avoid this message, you can quote * to allow git to make globes. This will give the git command to expand your paths, paying attention to the .gitignore file. For instance:
git add assets/\*
In this example, warnings and steps are not generated only the corresponding files, assets/file1.txt .
source share