Parcourir la source

depot local presque fini

Julien Dehos il y a 8 ans
Parent
commit
0e2351c225
4 fichiers modifiés avec 57 ajouts et 14 suppressions
  1. 2 2
      depot_local_checkout_03.svg
  2. 11 12
      depot_local_checkout_04.svg
  3. 39 0
      depot_local_checkout_05.svg
  4. 5 0
      index.md

+ 2 - 2
depot_local_checkout_03.svg

@@ -33,8 +33,8 @@
 <text x="125" y="-45" font-size="18"> HEAD </text>
 <path marker-end='url(#head)' stroke-width='2' stroke='black' d='M150,-30 L150,10' />
 
-<rect x="110" y="120" width="100" height="40" fill="khaki" stroke-width="2" stroke="black" />
-<text x="120" y="145" font-size="18"> version0 </text>
+<rect x="100" y="120" width="100" height="40" fill="khaki" stroke-width="2" stroke="black" />
+<text x="110" y="145" font-size="18"> version0 </text>
 <path marker-end='url(#head)' stroke-width='2' stroke='black' d='M150,120 L150,90' />
 
 <rect x="410" y="120" width="80" height="40" fill="orange" stroke-width="2" stroke="black" />

+ 11 - 12
depot_local_checkout_04.svg

@@ -12,11 +12,7 @@
 <circle cx="250" cy="50" r="30" stroke="black" stroke-width="2" fill="lightgreen"/>
 <text x="230" y="55" font-size="18"> 073... </text>
 
-<circle cx="350" cy="50" r="30" stroke="black" stroke-width="2" fill="lightgreen"/>
-<text x="330" y="55" font-size="18"> ff0... </text>
-
-<circle cx="450" cy="50" r="30" stroke="black" stroke-width="2" fill="lightgreen"/>
-<text x="430" y="55" font-size="18"> a8b... </text>
+<circle cx="350" cy="50" r="30" stroke="black" stroke-width="2" fill="white"/>
 
 <defs>
 <marker id='head' orient="auto" markerWidth='4' markerHeight='8' refX='0.2' refY='3'>
@@ -27,15 +23,18 @@
 <path marker-end='url(#head)' stroke-width='2' stroke='black' d='M80,50 L110,50' />
 <path marker-end='url(#head)' stroke-width='2' stroke='black' d='M180,50 L210,50' />
 <path marker-end='url(#head)' stroke-width='2' stroke='black' d='M280,50 L310,50' />
-<path marker-end='url(#head)' stroke-width='2' stroke='black' d='M380,50 L410,50' />
 
-<rect x="110" y="-70" width="80" height="40" fill="khaki" stroke-width="2" stroke="black" />
-<text x="125" y="-45" font-size="18"> HEAD </text>
-<path marker-end='url(#head)' stroke-width='2' stroke='black' d='M150,-30 L150,10' />
+<rect x="310" y="-70" width="80" height="40" fill="khaki" stroke-width="2" stroke="black" />
+<text x="325" y="-45" font-size="18"> HEAD </text>
+<path marker-end='url(#head)' stroke-width='2' stroke='black' d='M350,-30 L350,10' />
+
+<rect x="100" y="120" width="100" height="40" fill="khaki" stroke-width="2" stroke="black" />
+<text x="110" y="145" font-size="18"> version0 </text>
+<path marker-end='url(#head)' stroke-width='2' stroke='black' d='M150,120 L150,90' />
 
-<rect x="410" y="120" width="80" height="40" fill="orange" stroke-width="2" stroke="black" />
-<text x="420" y="145" font-size="18"> master </text>
-<path marker-end='url(#head)' stroke-width='2' stroke='black' d='M450,120 L450,90' />
+<rect x="210" y="120" width="80" height="40" fill="orange" stroke-width="2" stroke="black" />
+<text x="220" y="145" font-size="18"> master </text>
+<path marker-end='url(#head)' stroke-width='2' stroke='black' d='M250,120 L250,90' />
 
 </g>
 

+ 39 - 0
depot_local_checkout_05.svg

@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="600" height="250" >
+
+<g transform="translate(0,80)">
+
+<circle cx="50" cy="50" r="30" stroke="black" stroke-width="2" fill="lightgreen"/>
+<text x="30" y="55" font-size="18"> 59d... </text>
+
+<circle cx="150" cy="50" r="30" stroke="black" stroke-width="2" fill="lightgreen"/>
+<text x="130" y="55" font-size="18"> 7b3... </text>
+
+<circle cx="250" cy="50" r="30" stroke="black" stroke-width="2" fill="lightgreen"/>
+<text x="230" y="55" font-size="18"> 073... </text>
+
+<defs>
+<marker id='head' orient="auto" markerWidth='4' markerHeight='8' refX='0.2' refY='3'>
+<path d='M0,0 V6 L3,3 Z' />
+</marker>
+</defs>
+
+<path marker-end='url(#head)' stroke-width='2' stroke='black' d='M80,50 L110,50' />
+<path marker-end='url(#head)' stroke-width='2' stroke='black' d='M180,50 L210,50' />
+
+<rect x="210" y="-70" width="80" height="40" fill="khaki" stroke-width="2" stroke="black" />
+<text x="225" y="-45" font-size="18"> HEAD </text>
+<path marker-end='url(#head)' stroke-width='2' stroke='black' d='M250,-30 L250,10' />
+
+<rect x="100" y="120" width="100" height="40" fill="khaki" stroke-width="2" stroke="black" />
+<text x="110" y="145" font-size="18"> version0 </text>
+<path marker-end='url(#head)' stroke-width='2' stroke='black' d='M150,120 L150,90' />
+
+<rect x="210" y="120" width="80" height="40" fill="orange" stroke-width="2" stroke="black" />
+<text x="220" y="145" font-size="18"> master </text>
+<path marker-end='url(#head)' stroke-width='2' stroke='black' d='M250,120 L250,90' />
+
+</g>
+
+</svg>
+

+ 5 - 0
index.md

@@ -350,6 +350,11 @@ ces commits sont conservées dans l'état courant (non commité).
 
 ![](depot_local_checkout_04.svg)
 
+La commande `git reset --hard 073...` revient au commit "073..." et annule tous les
+commits suivant **en supprimant les modifications correspondantes**.
+
+![](depot_local_checkout_05.svg)
+
 
 ### Exercice