O'Reilly logo

Learn to Program with Minecraft Plugins, 2nd Edition by Andy Hunt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Remember Changes

Now that you have Git, you need to tell it which of your files it needs to remember. You don’t actually want all of them.

Typically you don’t want to store .class or .jar files, as those can always be created again. You definitely want Git to remember all your .java source code, and your plugin-configuration file and build script.

So first thing, let’s clean up the plugin directory and get rid of the extra junk:

 
$ ​rm -r bin
 
$ ​rm -r dist

That removed the generated .class and .jar files. Now you’re left with a clean directory tree, with the files you want Git to remember and track changes for.

You use git add files…, where files can be individual file or directory names. Since for now you want everything in the current ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required