New intellij install, new sourcetree installation, new android project, .gitignore
has been initialized as:
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
The files in the gradle wrapper, that's gradle/wrapper/gradle.properties
and gradle/wrapper/gradle.jar
are ignored. And they should be added.
$git add gradle/wrapper/gradle-wrapper.jar
The following paths are ignored by one of your .gitignore files:
gradle/wrapper/gradle-wrapper.jar
It does not tell me which .gitignore
file.
There is no .gitignore
in gradle/
or gradle/wrapper
.
While I can force this, I don't want to forget in future projects.
It sounds like a global ignore file is what’s gumming up the works here. You can use git check-ignore --verbose gradle/wrapper/gradle-wrapper.jar
to see exactly what pattern from which file is determining git’s ignore behavior. (Docs on git check-ignore
)
I think the best real solution here to make sure that this particular file is not ignored, irregardless of global ignore files or broad rules for ignoring .jar
files.
To that end, you can add !/gradle/wrapper/gradle-wrapper.jar
to the end of your repo’s .gitignore
file. (See the finer points of .gitignore
file pattern matching & exclusion at bottom of the docs on .gitignore
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With