79748520

Date: 2025-08-27 22:50:00
Score: 1.5
Natty:
Report link

Using the ! character before the path to the file should work, in your .gitignore file

# Ignore all .jar files...
*.jar

# ...except gradle-wrapper.jar
!path/to/gradle-wrapper.jar

From https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#%5C_ignoring:

You can negate a pattern by starting it with an exclamation point (!).

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Harrison Paine