]> rtime.felk.cvut.cz Git - hubacji1/oneflow.git/commitdiff
Extend status section in introduction
authorJiri Hubacek <hubacji1@fel.cvut.cz>
Wed, 10 Oct 2018 13:17:29 +0000 (15:17 +0200)
committerJiri Hubacek <hubacji1@fel.cvut.cz>
Wed, 10 Oct 2018 14:20:24 +0000 (16:20 +0200)
intro.md

index fb8dcd4c9355359971c1cd3638395c67ec325deb..4050b82bab6d104c776b54ec11822481877ebd1d 100644 (file)
--- a/intro.md
+++ b/intro.md
@@ -62,7 +62,7 @@ Use the change stored in history.
 git show COMMIT_ID
 ```
 
-# Changes - check out before commit
+# What is repository current state
 The status of the repository can be checked by `git status` command. This
 allows you to see *new files* that are not yet tracked, *changed files* whose
 changes are not yet ready to be commited to the log history and *changed files*
@@ -71,6 +71,39 @@ that are ready.
 The `git diff` command shows *changes* in not-yet-ready files and `git diff
 --cached` shows *changes* that are ready to be committed.
 
+## Command `git status`
+Show information about files in repository.
+```
+git status
+```
+
+There are 3 states for file changes (let's call them *patches*) before stored
+to git history: *untracked*, *unstaged*, and *staged*. Note that the whole file
+may be patch. Also, `git status` command does not show patches, but files
+containing these patches.
+
+*Untracked* means that patch was not stored by git yet.
+
+*Unstaged* files has older version stored in git history but patches are not
+ready to be stored in git history.
+
+*Staged* files has older version stored in git and patches will be stored to
+git history as soon as `git commit` command is used.
+
+## Command `git diff`
+The patches (file changes) may be shown by `git diff` command (because `git
+status` show files not patches).
+
+Unstaged patches can be seen by:
+```
+git diff
+```
+
+And staged patches by:
+```
+git diff --cached
+```
+
 # Commit - build repository history
 You get ready the files to be commited to the history by `git add FILE`
 command. If you change your mind, you may `git reset FILE` that file.
@@ -111,6 +144,7 @@ Use `git COMMAND --help` for showing the help!
 - `git show COMMIT`
 
 ## Changes
+- `git status`
 - `git diff`
 - `git diff --cached`