v0.6.0
- inklusive merge
This commit is contained in:
parent
ef9badf06e
commit
dbecb4b4d9
@ -1,5 +1,11 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
- **15/07/25** - commit: v0.6.0
|
||||||
|
- **Hinzugefügt:**
|
||||||
|
- [X] Commit Entscheidungshilfe
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
- **14/07/25** - commit: v0.5.0
|
- **14/07/25** - commit: v0.5.0
|
||||||
- [x] neue Artikel hinzugefügt
|
- [x] neue Artikel hinzugefügt
|
||||||
|
|
||||||
|
@ -71,6 +71,7 @@ Unter `./tools/` befinden sich Programme/ Skripte (aktuell in Typescript und Pyt
|
|||||||
- [SSH-Zugriff auf Git-Repository in WSL einrichten](dokus/git/git-ssh-remote.md)
|
- [SSH-Zugriff auf Git-Repository in WSL einrichten](dokus/git/git-ssh-remote.md)
|
||||||
- [Git – Remote-Branches: Häufige Aufgaben und Lösungen](dokus/git/git-remote-branch.md)
|
- [Git – Remote-Branches: Häufige Aufgaben und Lösungen](dokus/git/git-remote-branch.md)
|
||||||
- [Git-Submodule: Der umfassende Praxisleitfaden](dokus/git/git-submodule-leitfaden.md)
|
- [Git-Submodule: Der umfassende Praxisleitfaden](dokus/git/git-submodule-leitfaden.md)
|
||||||
|
- [Git-Cheat Sheet Commit Etscheidungshilfe](dokus/git/commit-etscheidungshilfe.md)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
47
dokus/git/commit-etscheidungshilfe.md
Normal file
47
dokus/git/commit-etscheidungshilfe.md
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
# 💡Git-Cheat Sheet mit den wichtigsten Commit-Strategien als Übersicht
|
||||||
|
|
||||||
|
## 🧭 **Commit-Strategien in Git – Entscheidungsbaum**
|
||||||
|
|
||||||
|
```plaintext
|
||||||
|
┌───────────────────────────────┐
|
||||||
|
│ Möchtest du Commit speichern? │
|
||||||
|
└──────────────┬────────────────┘
|
||||||
|
│
|
||||||
|
┌─────────────▼──────────────┐
|
||||||
|
│ Lokaler Commit │
|
||||||
|
└─────────────┬──────────────┘
|
||||||
|
│
|
||||||
|
┌───────────────▼───────────────────────────┐
|
||||||
|
│ Ist es eine Korrektur des letzten Commit? │
|
||||||
|
└─────┬─────────────────┬───────────────────┘
|
||||||
|
│ │
|
||||||
|
┌─────────────▼───────┐ ┌─────▼──────────────┐
|
||||||
|
│ `--amend` verwenden │ │ Normaler Commit │
|
||||||
|
└─────────────────────┘ └────────────────────┘
|
||||||
|
```
|
||||||
|
|
||||||
|
🔀 Möchtest du zwei Branches zusammenführen?
|
||||||
|
|
||||||
|
```plaintext
|
||||||
|
┌─────────────────┬───────────────┐
|
||||||
|
│ │ │
|
||||||
|
┌─────▼────────┐ ┌──────▼───────┐ ┌─────▼────────┐
|
||||||
|
│ Fast-Forward │ │ Merge-Commit │ │ Rebase │
|
||||||
|
└──────────────┘ └──────────────┘ └──────────────┘
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🧪 **Wann nutzt man welche Strategie?**
|
||||||
|
|
||||||
|
| Strategie | Use Case | Kommandos |
|
||||||
|
|----------------|---------------------------------------------------|------------------------------------------------|
|
||||||
|
| Commit | Lokale Änderungen speichern | `git commit -m "Message"` |
|
||||||
|
| Amend | Letzten Commit ändern/ergänzen | `git commit --amend` |
|
||||||
|
| Merge Commit | Branches zusammenführen mit Historie | `git merge <branch>` |
|
||||||
|
| Fast-Forward | Branch einfach „vorziehen“ | `git merge --ff-only <branch>` |
|
||||||
|
| Rebase | Änderungen auf andere Spitze übertragen | `git rebase <branch>` oder `git pull --rebase` |
|
||||||
|
| Squash | Mehrere Commits zusammenfassen | `git rebase -i HEAD~n` → `squash` |
|
||||||
|
| Cherry-Pick | Einzelnen Commit übernehmen | `git cherry-pick <hash>` |
|
||||||
|
| Revert | Commit rückgängig machen mit neuem Commit | `git revert <hash>` |
|
||||||
|
| Stash & Commit | Änderungen zwischenspeichern und später committen | `git stash` → `git stash pop` → `commit` |
|
@ -21,3 +21,4 @@ dokus/linux/nutzer-id-nfs_freigaben.md
|
|||||||
dokus/texlive-fedora.md
|
dokus/texlive-fedora.md
|
||||||
dokus/vs-codium.md
|
dokus/vs-codium.md
|
||||||
dokus/git/git-submodule-leitfaden.md
|
dokus/git/git-submodule-leitfaden.md
|
||||||
|
dokus/git/commit-etscheidungshilfe.md
|
||||||
|
Loading…
x
Reference in New Issue
Block a user