SalamLang / Salam

Salam Language: The inaugural coding language for Persian and Arabic speakers, inspired by the word salam meaning peace. With a user-friendly approach, it provides an accessible coding experience, promoting collaboration and simplicity for local developers.
https://www.salamlang.ir
GNU General Public License v3.0
10 stars 8 forks source link

Check and validate .gitignore file #322

Open BaseMax opened 1 week ago

BaseMax commented 1 week ago

Looks valid.

C:\Users\MAX\Salam>git check-ignore -v -- .gitignore
BaseMax commented 1 week ago

C:\Users\MAX\Salam>git check-ignore -v *

C:\Users\MAX\Salam>git check-ignore *

why results are empty?

BaseMax commented 1 week ago

https://scriptcrunch.com/git-show-ignored-files/#:~:text=To%20do%20this%2C%20execute%20the,it%20is%20ignored%20by%20git.

BaseMax commented 1 week ago

learn more: https://gist.github.com/jstnlvns/ebaa046fae16543cc9efc7f24bcd0e31

BDadmehr0 commented 6 days ago
  1. Check .gitignore file
    Ensure the .gitignore file exists in the root directory and has valid patterns. Example to ignore .log files:

    *.log
  2. Verify ignored files
    Use git check-ignore to verify if files are being ignored:

    git check-ignore -v somefile.txt

    If using git check-ignore -v *, ensure some files match .gitignore patterns.

  3. Avoid shell expansion
    * expands in the shell before being passed to git. To prevent this, use:

    git check-ignore -v -- *
  4. Check .gitignore syntax
    Make sure your .gitignore patterns are correct. Refer to Git ignore documentation for details.

  5. Untrack previously tracked files
    If files were tracked before adding to .gitignore, run:

    git rm --cached <file>

This should help you understand and troubleshoot why git check-ignore might not be returning any results.