#How to unignore specific directory in gitignore

1 messages · Page 1 of 1 (latest)

fleet temple
#

title

solar belfryBOT
#

<@&987246964494204979> please have a look, thanks.

solar belfryBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

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.

fleet temple
#

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

hollow mural
#

whats the hard part here?

fleet temple
#

anyway i figured it out

#

just unignoring the directory isn't enough

hollow mural
fleet temple
#

i also had to unignore .jar for that specific directory

fleet temple
#

! means negate in gitignore

hollow mural
#

@fleet temple !libs/*

fleet temple
#

what?

#

read the title

#

'how to unignore'

hollow mural
fleet temple
#

okay yeah i messed that one up

#

that's once not 3 times tho

hollow mural
#

unignore -> ignore -> unignore

#

i count it as 3

#

anyways

fleet temple
#

alright apparently this isn't the right syntax

#

!/libs/*.jar

hollow mural
fleet temple
#

nop

hollow mural
fleet temple
#

that won't work cause i have ignored .jar globally

#

and i need to unignore it only for this specific dir

hollow mural
#

ohw

#

ok

fleet temple
#

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

hollow mural
#

what about without the * as well?

#

i want to know

fleet temple
#

sec

#

doesn't seem to make a diff

#

altho i might need to clear the cache

#

but this is the way i want it to be

#

u can test it urself easily tho

#

ty for help