summaryrefslogtreecommitdiffhomepage
path: root/git.html.markdown
diff options
context:
space:
mode:
authorGeoff Liu <g@geoffliu.me>2015-06-16 12:55:06 -0600
committerGeoff Liu <g@geoffliu.me>2015-06-16 12:55:06 -0600
commita6af51e42f6eef190fe8bdc602a7c07f040d4f5e (patch)
treefb18c44e2692e397e7937c96c65079b40b7ee79b /git.html.markdown
parent7070304d60715405bb5f2432f4c84868a6418376 (diff)
parente31b9e90c9bddda007f7b9a30aab0263443e9212 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'git.html.markdown')
-rw-r--r--git.html.markdown17
1 files changed, 15 insertions, 2 deletions
diff --git a/git.html.markdown b/git.html.markdown
index af65afb0..4bbc58e7 100644
--- a/git.html.markdown
+++ b/git.html.markdown
@@ -79,6 +79,11 @@ this pointer will automatically update and point to the latest commit.
HEAD is a pointer that points to the current branch. A repository only has 1 *active* HEAD.
head is a pointer that points to any commit. A repository can have any number of heads.
+###Stages of Git
+* Modified - Changes have been made to a file but file has not been committed to Git Database yet
+* Staged - Marks a modified file to go into your next commit snapshot
+* Committed - Files have been committed to the Git Database
+
### Conceptual Resources
* [Git For Computer Scientists](http://eagain.net/articles/git-for-computer-scientists/)
@@ -131,6 +136,10 @@ $ git help -a
$ git help add
$ git help commit
$ git help init
+# or git <command_here> --help
+$ git add --help
+$ git commit --help
+$ git init --help
```
### status
@@ -149,8 +158,8 @@ $ git help status
### add
-To add files to the current working tree/directory/repo. If you do not `git add` new files to the
-working tree/directory, they will not be included in commits!
+To add files to the staging area/index. If you do not `git add` new files to the
+staging area/index, they will not be included in commits!
```bash
# add a file in your current working directory
@@ -163,6 +172,8 @@ $ git add /path/to/file/HelloWorld.c
$ git add ./*.java
```
+This only adds a file to the staging area/index, it doesn't commit it to the working directory/repo.
+
### branch
Manage your branches. You can view, edit, create, delete branches using this command.
@@ -462,3 +473,5 @@ $ git rm /pather/to/the/file/HelloWorld.c
* [GitGuys](http://www.gitguys.com/)
* [Git - the simple guide](http://rogerdudler.github.io/git-guide/index.html)
+
+* [Pro Git](http://www.git-scm.com/book/en/v2)