Java Reference
In-Depth Information
You use git add files… , where files can be individual file or directory names.
Since for now you want everything in the current directory from here on down,
you can just type gitadd. :
$ git add .
(Remember that “.” means the current directory.) Now Git knows to watch all
these files.
But it hasn't yet taken a snapshot of the current state of your files. To have
it do that, you have to commit your changes:
$ git commit -a -m 'My first commit'
That command will record the current state of your source code in Git's
repository. The -a means to commit changes in all the tracked files, and the
-m lets you specify a message .
The message is very important: it's how you can tell what you were doing
when you changed these files. If you use a wonderfully descriptive message
like “I did stuff,” then this won't help you any.
Let's play with that a moment. Create a new file in the CowShooter directory
and name it README.txt . Put anything you want in the file: comments about
the plugin, your own personal manifesto, nonsense text, whatever.
Now add the file and commit the add:
$ git add README.txt
$ git commit -a -m "Add my personal screed"
[master 50847c8] Add my personal screed
1 file changed, 1 insertion(+)
create mode 100644 README.txt
To see the history of your commit messages, you use gitlog :
$ git log
commit 50847c8a3e60dbfc8f441894202765eb23fbd9a5
Author: Andy Hunt <>
Fri Jan 7 15:51:22
Add my personal screed
commit aa58dfa87fa79b01e2c7ce172bbcdd41b7e962d6
Author: Andy Hunt <>
Tue Jan 7 15:50:31
First Commit
Search WWH ::

Custom Search