Java Reference
In-Depth Information
Once it's installed, you should configure it globally with your name and email
address:
$ git config --global user.name "Your Name"
$ git config --global user.email "you@example.com"
Git on Windows
The Git distribution for Windows includes a well-intentioned but problematic version
of the Bash shell. Readers tell me it doesn't work very well. In the Git installer for
Windows, you'll want to choose “Run Git from Windows command prompt” instead
of selecting the default “Git bash” option.
Also, you may run into complaints about line-ending differences. Windows uses the
CR LF characters to mark the end of lines, and other systems just use LF. Java is
fine with either convention, and so are most editors. But git may warn you that it's
trying to convert line endings; don't worry about it.
You set up Git once per project. Let's do that right now, in the CowShooter plugin.
cd to the top-level CowShooter directory and type gitinit :
$ cd CowShooter/
$ ls
Canary.inf Manifest.txt bin build.sh dist src
$ git init
Initialized empty Git repository in /Users/andy/Desktop/code/CowShooter/.git/
That creates a magical, hidden directory named .git where Git will store its
memories—what Git calls your repository . You need to do this only once for
each project, which in our case will be once per plugin.
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.
 
 
 
Search WWH ::




Custom Search