summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEkaitz Zarraga <ekaitz@elenq.tech>2022-05-30 21:36:32 +0200
committerEkaitz Zarraga <ekaitz@elenq.tech>2022-05-30 21:36:32 +0200
commit81c19a90af8fcf770ff796e922f711713ed534fd (patch)
treeaddd43887ab7b369c7dab97ae0bb56a010156ef1
parentf7b306608b57f1de880ae9d968c95bce099906ed (diff)
resets ftw
-rw-r--r--2.md75
-rw-r--r--img/reset-ex1.pngbin0 -> 12174 bytes
-rw-r--r--img/reset-ex2.pngbin0 -> 15545 bytes
-rw-r--r--img/reset-ex3.pngbin0 -> 20739 bytes
-rw-r--r--img/reset-ex4.pngbin0 -> 20618 bytes
-rw-r--r--img/reset-ex5.pngbin0 -> 20740 bytes
-rw-r--r--img/reset-ex6.pngbin0 -> 23975 bytes
-rw-r--r--img/reset-ex7.png0
-rw-r--r--img/reset-hard.pngbin0 -> 29415 bytes
-rw-r--r--img/reset-mixed.pngbin0 -> 29421 bytes
-rw-r--r--img/reset-soft.pngbin0 -> 28551 bytes
-rw-r--r--img/reset-start.pngbin0 -> 24729 bytes
-rw-r--r--img/reset-workflow.pngbin0 -> 14024 bytes
13 files changed, 75 insertions, 0 deletions
diff --git a/2.md b/2.md
index 967be9a..a468b56 100644
--- a/2.md
+++ b/2.md
@@ -237,3 +237,78 @@ dituzte.
- `-S` *pikeaxe* funtzioa
- `-L` lerroen eboluzioa edo funtzioaren eboluzioa erakusten du
+## Historia berridazten
+
+- `git commit --amend` mini-rebase baten eragina dauka
+- `git rebase -i|--interactive <commit>` aukeratutako commitera ailegatzeko
+ behar diren commitak aldatu.
+ Editorearen bitartez commit bakoitzarekin zer egin behar duen adierazi ahal
+ zaio: commitak batu, aukeratu, mezua berridatzi, editatu... Aukera batzuek
+ prozesua gelditzen dute. `git rebase --continue` egiten aurrera jarraitzen
+ da, edo `--abort` egiten prozesua ezeztatzen da. Komandoak berak oso ondo
+ azaltzen du nola egin.
+
+> KONTUZ: N+1 commit aldatu emaitza gutxienez commit bat behar duelako
+
+- `git filter-branch` eta antzeko tresnek aldaketa sakonak egin ditzakete.
+ Adibidez, fitxategi bat commit *guztietatik* kendu.
+
+## Reset eta checkout sakonki — I
+
+Reset eta Checkout ulertzeko Giten fitxategien egoerak eta haien arteko
+trantsizioak ondo ulertu behar dira. Hiru egoera posible daude:
+
+1. HEAD: repositorioaren azkeneko commitaren snapshota
+2. Index: *staging area*, hurrengo commitaren proposamena
+3. Working Directory: Aldaketak egiten ditugun lekua
+
+![Egoren arteko trantsizioak](img/reset-workflow.png){height=150px}
+
+## Reset eta checkout sakonki — II
+
+- `git reset`-ek hiru modu ditu:
+ - `--soft`: HEAD-ak apuntatzen duen adarra mugitu
+ - `--mixed`: `--soft` + aldaketak indexera pasatu
+ - `--hard`: `--mixed` + aldaketak working direktory-ra pasatu, bertako
+ aldaketak zapalduz
+
+
+## Reset eta checkout sakonki — III
+
+![&nbsp;](img/reset-ex1.png)
+
+## Reset eta checkout sakonki — IV
+
+![&nbsp;](img/reset-ex2.png)
+
+## Reset eta checkout sakonki — V
+
+![&nbsp;](img/reset-ex3.png)
+
+## Reset eta checkout sakonki — VI
+
+![&nbsp;](img/reset-ex4.png)
+
+## Reset eta checkout sakonki — VII
+
+![&nbsp;](img/reset-ex5.png)
+
+## Reset eta checkout sakonki — VIII
+
+![&nbsp;](img/reset-ex6.png)
+
+## Reset eta checkout sakonki — IX
+
+![Commit gehiago gehituta](img/reset-start.png)
+
+## Reset eta checkout sakonki — IX
+
+![&nbsp;](img/reset-soft.png)
+
+## Reset eta checkout sakonki — X
+
+![&nbsp;](img/reset-mixed.png)
+
+## Reset eta checkout sakonki — XI
+
+![&nbsp;](img/reset-hard.png)
diff --git a/img/reset-ex1.png b/img/reset-ex1.png
new file mode 100644
index 0000000..2ffd68b
--- /dev/null
+++ b/img/reset-ex1.png
Binary files differ
diff --git a/img/reset-ex2.png b/img/reset-ex2.png
new file mode 100644
index 0000000..f4ffd2a
--- /dev/null
+++ b/img/reset-ex2.png
Binary files differ
diff --git a/img/reset-ex3.png b/img/reset-ex3.png
new file mode 100644
index 0000000..7427493
--- /dev/null
+++ b/img/reset-ex3.png
Binary files differ
diff --git a/img/reset-ex4.png b/img/reset-ex4.png
new file mode 100644
index 0000000..3cfbf7f
--- /dev/null
+++ b/img/reset-ex4.png
Binary files differ
diff --git a/img/reset-ex5.png b/img/reset-ex5.png
new file mode 100644
index 0000000..c21a253
--- /dev/null
+++ b/img/reset-ex5.png
Binary files differ
diff --git a/img/reset-ex6.png b/img/reset-ex6.png
new file mode 100644
index 0000000..c64cc38
--- /dev/null
+++ b/img/reset-ex6.png
Binary files differ
diff --git a/img/reset-ex7.png b/img/reset-ex7.png
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/img/reset-ex7.png
diff --git a/img/reset-hard.png b/img/reset-hard.png
new file mode 100644
index 0000000..a9da7ce
--- /dev/null
+++ b/img/reset-hard.png
Binary files differ
diff --git a/img/reset-mixed.png b/img/reset-mixed.png
new file mode 100644
index 0000000..0266fe5
--- /dev/null
+++ b/img/reset-mixed.png
Binary files differ
diff --git a/img/reset-soft.png b/img/reset-soft.png
new file mode 100644
index 0000000..831d9f6
--- /dev/null
+++ b/img/reset-soft.png
Binary files differ
diff --git a/img/reset-start.png b/img/reset-start.png
new file mode 100644
index 0000000..70b3fb0
--- /dev/null
+++ b/img/reset-start.png
Binary files differ
diff --git a/img/reset-workflow.png b/img/reset-workflow.png
new file mode 100644
index 0000000..1c01e0d
--- /dev/null
+++ b/img/reset-workflow.png
Binary files differ