aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools
diff options
context:
space:
mode:
authorJohannes Stoelp <johannes.stoelp@gmail.com>2022-03-20 21:58:51 +0100
committerJohannes Stoelp <johannes.stoelp@gmail.com>2022-03-20 21:58:51 +0100
commit58c6d98940ca322bfe91d8ae6c8fc3e988347513 (patch)
tree382a5c71b0b4db7113ccef4c35e0219e042e8707 /src/tools
parent33d74c3b33394769a2040ff451fbfdfd58e9bf92 (diff)
downloadnotes-58c6d98940ca322bfe91d8ae6c8fc3e988347513.tar.gz
notes-58c6d98940ca322bfe91d8ae6c8fc3e988347513.zip
git: added working areas + file at specific commit
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/git.md33
1 files changed, 32 insertions, 1 deletions
diff --git a/src/tools/git.md b/src/tools/git.md
index a626eae..7262ba4 100644
--- a/src/tools/git.md
+++ b/src/tools/git.md
@@ -1,6 +1,35 @@
# git(1)
-## staging
+## Working areas
+```text
++-------------------+ --- stash -----> +-------+
+| working directory | | stash | // Shelving area.
++-------------------+ <-- stash pop -- +-------+
+ | ^
+ add |
+ | reset
+ v |
++-------------------+
+| staging area |
++-------------------+
+ |
+ commit
+ |
+ v
++-------------------+
+| local repository |
++-------------------+
+ | ^
+ push |
+ | fetch /
+ | pull
+ v |
++-------------------+
+| remote repository |
++-------------------+
+```
+
+## Staging
```markdown
git add -p [<file>] ............ partial staging (interactive)
```
@@ -67,6 +96,8 @@
git show --stat <commit> ................ show files changed by <commit>
git show <commit> [<file>] .............. show diffs for <commit>
+
+ git git show <commit>:<file> ............ show <file> at <commit>
```
## Patching