Git diagrams: различия между версиями

Материал из Поле цифровой дидактики
Нет описания правки
Нет описания правки
Строка 4: Строка 4:
|Environment=Graphviz
|Environment=Graphviz
}}
}}
<graphviz>
digraph {
node [shape = "box"];
"Администратор мероприятия" [color = black];


"Участник 1" [color = black] ;
==== Git concepts and operation (graphviz) ====
"Участник 2" [color = black] ;
"Участник Х" [color = black] ;
"Участник Y" [color = black] ;


"Администратор" -> "Участник 1";
<graphviz>
"Администратор" -> "Участник 2";
  digraph git_basics {
"Администратор" -> "Участник Х";
size="8,8" ;
"Администратор" -> "Участник Y";
graph [
 
label = "Basic git concepts and operations\n\n"
"Участник Х" -> "Тема мероприятия" [label = " создает" decorate=true] ;
labelloc = t
 
fontname = "Helvetica,Arial,sans-serif"
"Участник Y" -> "Группа Z" [label = " создает" decorate=true];
fontsize = 20
 
layout = dot
"Тема мероприятия" [color = black];
rankdir = LR
"Группа Z" [color = black];
newrank = true
 
]
"Участник 1"  -> "Тема мероприятия" [dir=both label = " включается" decorate=true];
node [
"Администратор" -> "Тема мероприятия" [label = "утверждает" decorate=true] ;
style=filled
"Участник 2" -> "Группа Z" [dir=both label = " включается" decorate=true];
shape=rect
 
pencolor="#00000044" // frames color
"Тема мероприятия" -> "Участник Х" [label = "участвует в мероприятии" decorate=true];
fontname="Helvetica,Arial,sans-serif"
"Администратор" -> "Тема мероприятия" [label = "утверждает" decorate=true] ;
shape=plaintext
"Группа Z" -> "Участник Y" [label = " участвует в мероприятии" decorate=true]
]
edge [
arrowsize=0.5
fontname="Helvetica,Arial,sans-serif"
labeldistance=3
labelfontcolor="#00000080"
penwidth=2
style=dotted // dotted style symbolizes data transfer
]
changes [
color="#88000022"
label=<<table border="0" cellborder="1" cellspacing="0" cellpadding="4">
<tr> <td> <b>changes</b><br/>in the working tree </td> </tr>
<tr> <td align="left"><i>To view: </i><br align="left"/>
git diff
<br align="left"/></td> </tr>
</table>>
shape=plain
]
staging [
fillcolor="#ff880022"
label=<<table border="0" cellborder="1" cellspacing="0" cellpadding="4">
<tr> <td> <b>staging area</b><br/>(cache, index)</td> </tr>
<tr> <td align="left"><i>To view: </i><br align="left"/>
git diff --staged
<br align="left"/></td> </tr>
</table>>
shape=plain
]
staging -> HEAD:push [label="git commit" weight=1000 color="#88000088"]
stash [
fillcolor="#0044ff22"
label=<<table border="0" cellborder="1" cellspacing="0" cellpadding="4">
<tr> <td> <b>stash</b></td> </tr>
<tr> <td align="left"><i>To view:</i><br align="left"/>
git stash list
<br align="left"/></td> </tr>
</table>>
shape=plain
]
stash_push [
label="git stash [push]"
style=""
shape=plain
color="#00008844"
]
{
edge [arrowhead=none color="#00008844"]
changes -> stash_push
stash_push -> staging
}
changes -> stash [
dir=back
xlabel="git stash pop"
color="#00000088" weight=0]
stash_push -> stash [xdir=back color="#00008844" minlen=0]
HEAD [
fillcolor="#88ff0022"
label=<<table border="0" cellborder="1" cellspacing="0" cellpadding="3">
<tr> <td port="push" sides="ltr"> <b>HEAD </b>of</td> </tr>
<tr> <td port="pull" sides="lbr"> the current branch</td> </tr>
<tr> <td port="switch" align="left">
<i>To view:</i>
<br align="left"/>
git show<br align="left"/>
git log
<br align="left"/>
</td> </tr>
<tr> <td align="left">
<i>To change branch:</i><br align="left"/>
git switch ...
<br align="left"/>
git checkout ...
<br align="left"/>
</td> </tr>
</table>>
shape=plain
]
remote [
label="remote branch"
shape=box
color="#00000022"
fillcolor="#00ff0022"
]


HEAD:push -> remote [label="git push" color="#88000088"]
HEAD:pull -> remote [dir=back label="git pull" color="#00440088"]
branches [
fillcolor="#00888822"
label=<<table border="0" cellborder="1" cellspacing="0" cellpadding="4">
<tr> <td> <b>local branches</b> </td> </tr>
<tr> <td align="left"><i>To view:</i><br align="left"/>
git branch [--list]
<br align="left"/></td> </tr>
</table>>
shape=plain
]
changes -> staging [label="git add ...    \ngit reset      " color="#88000088"]
discard [shape=plaintext style=""]
changes -> discard [label="git restore ..." color="#88000088"]
{rank=same changes discard}
// UML style aggregation
HEAD:switch -> branches [
dir=back
style=""
penwidth=1
arrowtail=odiamond
arrowhead=none
color="#00000088"
]
}
}


</graphviz>
</graphviz>


 
[[Категория:Diagrams]]
 
 
[[Category:Diagrams]]

Версия от 11:27, 21 мая 2023


Описание Диаграмма Сообщества "LiderID"
Область знаний NetSci, Образование, Управление
Среды для создания диаграммы: Graphviz


Git concepts and operation (graphviz)