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

index 16202cb5e0d4fdf76b0228aaf165831fd414a253..42ce2b8f8b1acd844fe13a9ea75ebebf0530c0c3 100644 (file)
--- a/intro.md
+++ b/intro.md
@@ -109,6 +109,30 @@ Use `git commit` to store staged patches to git history. Moving patches and
 files between states described above is done by `git add` and `git reset`
 commands.
 
+## Command `git add`
+To stage patches in file (it means to take untracked or unstaged patches and
+mark them as staged):
+```
+git add -p FILENAME
+```
+
+To stage all the patches in file use:
+```
+git add FILENAME
+```
+
+## Command `git reset`
+To remove patches from staged state (remove from staging area is also used):
+```
+git reset -p FILENAME
+```
+
+Or again for all the patches in file:
+```
+git reset FILE
+```
+
+## Command `git commit`
 When sure that staged changes should be commited to the history, use `git
 commit -m'COMMIT MSG'`. For commit messages, some rules are good to keep in
 mind [1][]:
@@ -144,10 +168,10 @@ Use `git COMMAND --help` for showing the help!
 - `git diff --cached`
 
 ## Commit
-- `git add FILE`
 - `git add -p FILE`
-- `git reset FILE`
+- `git add FILE`
 - `git reset -p FILE`
+- `git reset FILE`
 - `git commit -m'COMMIT MSG'`
 - `git commit`