Jump to content

Forge repo etiquette


Recommended Posts

I've recently switched over to the "proper" setup for Forge using gradle. What files should I commit to the mod repository and which should I .gitignore?


(Basically, which files are critical to the mod download from repo and which can I rely on gradle to rebuild for the downloadee?)


(I should mention I'm in the `gradlew idea` workspace)


My current .gitignore:



The folder hierarchy I'm working with:

|	<git stuff>
|	<gradle stuff>
|	<build stuff>
|	<run environment>
|	<class files>

Link to comment
Share on other sites

I use the following .gitignore:


# push src/ only


# Mobile Tools for Java (J2ME)

# Package Files #

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml


All one needs to build is the "gradle/" and the "src/" directory aswell as the "gradlew" and "gradlew.bat" and the "build.gradle" file. This explains the .gitignore file:

First I ignore all files, then I unignore all files mentioned above. The other ignores are default from GitHub.

Link to comment
Share on other sites

jabelar you should put the gradle wrapper into your repo, that's the whole point of the wrapper.


Sure, it wouldn't hurt.  The thing is for me I use the repo mostly for private backup and tutorial examples, so I mostly care about the code and I don't usually collaborate.  If I clone I likely still install a new Forge over top, and just preserve the source.  I don't usually edit the wrapper in a unique way, so am not worried about re-creating it as needed.  But still good idea for proper posterity.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Link to comment
Share on other sites

Thanks, diesieben, for clarifying, and jabelar and WorldsEnder for posting their .gitignores. I've got what I need now, thanks!

Link to comment
Share on other sites

This topic is now closed to further replies.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.