Blame view

webroot/doc/diagrams/GIT state diag.txt 1.64 KB
2285e405   Etienne Pallier   v2.13.13 - ajout ...
1
2
3
4
5
6
7
8
9
10
@startuml

'Version: 28/01/20'

title __GIT VARIOUS STATES__

/'
state "**CREATED** (créé)" as WD
'/

8fc420fa   Etienne Pallier   une etape de plus...
11
12
13

/' ALL STATES '/

ad9d4eba   Etienne Pallier   Update VERSION da...
14
1_WORK_DIR: Brouillon \n("git diff <file>" to see last changes made)\n("git clean" to delete last changes)
8fc420fa   Etienne Pallier   une etape de plus...
15

ad9d4eba   Etienne Pallier   Update VERSION da...
16
STASHED: Put in a temporary place \n("git stash list" to see content)\n("git stash show" to show changes from latest stash entry)\n("git stash drop" to show changes from latest stash entry)\n("git stash branch {BRANCH NAME}" creates a branch, starting from the HEAD at the moment you've stashed the changes, and applies the stashed changes to that branch)
8fc420fa   Etienne Pallier   une etape de plus...
17

ad9d4eba   Etienne Pallier   Update VERSION da...
18
2_STAGED: Ready to be commited\n("git diff --staged" to see last changes made and added)
8fc420fa   Etienne Pallier   une etape de plus...
19

ad9d4eba   Etienne Pallier   Update VERSION da...
20
3_LOCAL_REP: Local Repository (my device)\n("git log [-- graph]" to see all commits)\n("git diff HEAD^!" to see last commit changes)\n("git diff <commit-num>^!" to see changes introduced by commit-num)\n("git diff commit-num-from commit-num-to" to see changes between commit-num-from and commit-num-to)
8fc420fa   Etienne Pallier   une etape de plus...
21

ad9d4eba   Etienne Pallier   Update VERSION da...
22
4_REMOTE_REP: Remote Repository (a distant server...)
2285e405   Etienne Pallier   v2.13.13 - ajout ...
23

8fc420fa   Etienne Pallier   une etape de plus...
24
25
26



ad9d4eba   Etienne Pallier   Update VERSION da...
27
[*] --> 1_WORK_DIR : git clone (or git init) 
2285e405   Etienne Pallier   v2.13.13 - ajout ...
28

ad9d4eba   Etienne Pallier   Update VERSION da...
29
30
1_WORK_DIR -r-> STASHED : git **stash [push | save] [<stash_name>]**
STASHED -l-> 1_WORK_DIR : git **stash pop | apply**
2285e405   Etienne Pallier   v2.13.13 - ajout ...
31

ad9d4eba   Etienne Pallier   Update VERSION da...
32
33
34
1_WORK_DIR -d-> 2_STAGED : git **add** (file | .)
2_STAGED -l-> 1_WORK_DIR : git **checkout** -- (file | '*.py')
2_STAGED --> 1_WORK_DIR : git **reset** [--hard] [HEAD <file>]
2285e405   Etienne Pallier   v2.13.13 - ajout ...
35

ad9d4eba   Etienne Pallier   Update VERSION da...
36
37
2_STAGED --> 3_LOCAL_REP : git **commit** -m "message" [ file | . ] [origin <branch-name>]
3_LOCAL_REP --> 2_STAGED : git **reset --soft** HEAD^ \n(= commit -1)
2285e405   Etienne Pallier   v2.13.13 - ajout ...
38

ad9d4eba   Etienne Pallier   Update VERSION da...
39
40
3_LOCAL_REP --> 4_REMOTE_REP : git **push** [origin <branch-name>]
4_REMOTE_REP --> 3_LOCAL_REP : WHICH COMMAND ???
2285e405   Etienne Pallier   v2.13.13 - ajout ...
41
42
43


@enduml