diff options
-rw-r--r-- | 2.md | 75 | ||||
-rw-r--r-- | img/reset-ex1.png | bin | 0 -> 12174 bytes | |||
-rw-r--r-- | img/reset-ex2.png | bin | 0 -> 15545 bytes | |||
-rw-r--r-- | img/reset-ex3.png | bin | 0 -> 20739 bytes | |||
-rw-r--r-- | img/reset-ex4.png | bin | 0 -> 20618 bytes | |||
-rw-r--r-- | img/reset-ex5.png | bin | 0 -> 20740 bytes | |||
-rw-r--r-- | img/reset-ex6.png | bin | 0 -> 23975 bytes | |||
-rw-r--r-- | img/reset-ex7.png | 0 | ||||
-rw-r--r-- | img/reset-hard.png | bin | 0 -> 29415 bytes | |||
-rw-r--r-- | img/reset-mixed.png | bin | 0 -> 29421 bytes | |||
-rw-r--r-- | img/reset-soft.png | bin | 0 -> 28551 bytes | |||
-rw-r--r-- | img/reset-start.png | bin | 0 -> 24729 bytes | |||
-rw-r--r-- | img/reset-workflow.png | bin | 0 -> 14024 bytes |
13 files changed, 75 insertions, 0 deletions
@@ -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 + +![ ](img/reset-ex1.png) + +## Reset eta checkout sakonki — IV + +![ ](img/reset-ex2.png) + +## Reset eta checkout sakonki — V + +![ ](img/reset-ex3.png) + +## Reset eta checkout sakonki — VI + +![ ](img/reset-ex4.png) + +## Reset eta checkout sakonki — VII + +![ ](img/reset-ex5.png) + +## Reset eta checkout sakonki — VIII + +![ ](img/reset-ex6.png) + +## Reset eta checkout sakonki — IX + +![Commit gehiago gehituta](img/reset-start.png) + +## Reset eta checkout sakonki — IX + +![ ](img/reset-soft.png) + +## Reset eta checkout sakonki — X + +![ ](img/reset-mixed.png) + +## Reset eta checkout sakonki — XI + +![ ](img/reset-hard.png) diff --git a/img/reset-ex1.png b/img/reset-ex1.png Binary files differnew file mode 100644 index 0000000..2ffd68b --- /dev/null +++ b/img/reset-ex1.png diff --git a/img/reset-ex2.png b/img/reset-ex2.png Binary files differnew file mode 100644 index 0000000..f4ffd2a --- /dev/null +++ b/img/reset-ex2.png diff --git a/img/reset-ex3.png b/img/reset-ex3.png Binary files differnew file mode 100644 index 0000000..7427493 --- /dev/null +++ b/img/reset-ex3.png diff --git a/img/reset-ex4.png b/img/reset-ex4.png Binary files differnew file mode 100644 index 0000000..3cfbf7f --- /dev/null +++ b/img/reset-ex4.png diff --git a/img/reset-ex5.png b/img/reset-ex5.png Binary files differnew file mode 100644 index 0000000..c21a253 --- /dev/null +++ b/img/reset-ex5.png diff --git a/img/reset-ex6.png b/img/reset-ex6.png Binary files differnew file mode 100644 index 0000000..c64cc38 --- /dev/null +++ b/img/reset-ex6.png 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 Binary files differnew file mode 100644 index 0000000..a9da7ce --- /dev/null +++ b/img/reset-hard.png diff --git a/img/reset-mixed.png b/img/reset-mixed.png Binary files differnew file mode 100644 index 0000000..0266fe5 --- /dev/null +++ b/img/reset-mixed.png diff --git a/img/reset-soft.png b/img/reset-soft.png Binary files differnew file mode 100644 index 0000000..831d9f6 --- /dev/null +++ b/img/reset-soft.png diff --git a/img/reset-start.png b/img/reset-start.png Binary files differnew file mode 100644 index 0000000..70b3fb0 --- /dev/null +++ b/img/reset-start.png diff --git a/img/reset-workflow.png b/img/reset-workflow.png Binary files differnew file mode 100644 index 0000000..1c01e0d --- /dev/null +++ b/img/reset-workflow.png |