mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
Added 'Stages of Git', link to Pro Git, and other forms of git help
This commit is contained in:
parent
db11e29195
commit
bdedf51a72
@ -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 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.
|
head is a pointer that points to any commit. A repository can have any number of heads.
|
||||||
|
|
||||||
|
###Stages of Git
|
||||||
|
* Committed - Files have been committed to the Git Database
|
||||||
|
* 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
|
||||||
|
|
||||||
### Conceptual Resources
|
### Conceptual Resources
|
||||||
|
|
||||||
* [Git For Computer Scientists](http://eagain.net/articles/git-for-computer-scientists/)
|
* [Git For Computer Scientists](http://eagain.net/articles/git-for-computer-scientists/)
|
||||||
@ -131,6 +136,10 @@ $ git help -a
|
|||||||
$ git help add
|
$ git help add
|
||||||
$ git help commit
|
$ git help commit
|
||||||
$ git help init
|
$ git help init
|
||||||
|
# or git <command_here> --help
|
||||||
|
$ git add --help
|
||||||
|
$ git commit --help
|
||||||
|
$ git init --help
|
||||||
```
|
```
|
||||||
|
|
||||||
### status
|
### status
|
||||||
@ -149,8 +158,8 @@ $ git help status
|
|||||||
|
|
||||||
### add
|
### add
|
||||||
|
|
||||||
To add files to the current working tree/directory/repo. If you do not `git add` new files to the
|
To add files to the staging area/index. If you do not `git add` new files to the
|
||||||
working tree/directory, they will not be included in commits!
|
staging area/index, they will not be included in commits!
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# add a file in your current working directory
|
# add a file in your current working directory
|
||||||
@ -163,6 +172,8 @@ $ git add /path/to/file/HelloWorld.c
|
|||||||
$ git add ./*.java
|
$ git add ./*.java
|
||||||
```
|
```
|
||||||
|
|
||||||
|
This only addds a file to the staging area/index, it doesn't commit it to the working directory/repo.
|
||||||
|
|
||||||
### branch
|
### branch
|
||||||
|
|
||||||
Manage your branches. You can view, edit, create, delete branches using this command.
|
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/)
|
* [GitGuys](http://www.gitguys.com/)
|
||||||
|
|
||||||
* [Git - the simple guide](http://rogerdudler.github.io/git-guide/index.html)
|
* [Git - the simple guide](http://rogerdudler.github.io/git-guide/index.html)
|
||||||
|
|
||||||
|
* [Pro Git](http://www.git-scm.com/book/en/v2)
|
||||||
|
Loading…
Reference in New Issue
Block a user