#How to unignore specific directory in gitignore
1 messages · Page 1 of 1 (latest)
<@&987246964494204979> please have a look, thanks.
While you are waiting for getting help, here are some tips to improve your experience:
If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.
Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.
I tried !directoryname and !directoryname/ neither worked
(the directory i want to ignore is in the root directory btw)
# Compiled class file
*.class
*.html
#.gif
#.png
*.dat
.gradle
**/build/
!src/**/build/
# Ignore Gradle GUI config
gradle-app.setting
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar
!libs
# Avoid ignore Gradle wrappper properties
!gradle-wrapper.properties
# Cache of project
.gradletasknamecache
# Eclipse Gradle plugin generated files
# Eclipse Core
.project
# JDT-specific (Eclipse Java Development Tools)
.classpath
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*
#idea
*.idea/
**/editor/datadump/
i want to ignore the libs folder
then just add it to the list?
whats the hard part here?
u can clearly see that i have it added already
anyway i figured it out
just unignoring the directory isn't enough
u have a ! at the start
i also had to unignore .jar for that specific directory
yes which is what i want
! means negate in gitignore
u want to ignore or not u changed ur statement 3 times already
@fleet temple !libs/*
@fleet temple yes and then here u say "ignore"
u have other than .jar stuff in libs folder?
nop
if not this is what u want
that won't work cause i have ignored .jar globally
and i need to unignore it only for this specific dir
ok ye
i see why this didn't work
!/libs/*.jar
because order matters in gitignore
my exclusion for all .jar files was below that statement
works fine now
ok what about without .jar at the end now?
what about without the * as well?
i want to know