programmieren:git
This is an old revision of the document!
Table of Contents
Git
Branches
- GitHub: Understanding the GitHub Flow
- Atlassian: Using Branches, Comparing Workflows (inkl. Feature Branch Workflow)
Referenzen
- Git Cheat Sheet von AlexKras.com
nützliche Kommandos
- alle Branches auf dem Server (aka “origin”) im aktuellen Repository anzeigen:
git remote show origin - Liste aller Branches (lokal + serverseitig):
git branch -vva
Zusammenführen
- einzelne Commits nacheinander anwenden
git cherry-pick abc321 efg654 xyz890 git pull --rebase origin master
- Branch auf Server löschen (nach dem Merge und nachdem man den Feature-Branch lokal gelöscht hat):
git push origin :branch_name
Darstellung
- Ausgabe der kompletten Historie als Graph:
git log --color --graph --oneline --all --decorate
- kompaktere Ausgabe:
git log --oneline
- Namenskonvention für Branches:
JIRATICKET-123_oberfunktion_meinfeature - neuen Branch anlegen:
git checkout master git pull git checkout -b DEIN_BRANCH_NAME git push
- Code zwischenlagern, z.B. beim Wechsel des Branches
git push git stash git pull git stash pop
Themes
base16-monokai
- für MINGW64 bzw. das dahinterliegende mintty
ForegroundColour=248,248,242 BackgroundColour=39,40,34 CursorColour=253,157,79 Black=39,40,34 BoldBlack=117,113,94 Red=249,38,114 BoldRed=204,6,78 Green=166,226,46 BoldGreen=122,172,24 Yellow=244,191,117 BoldYellow=240,169,69 Blue=102,217,239 BoldBlue=33,199,233 Magenta=174,129,255 BoldMagenta=126,51,255 Cyan=161,239,228 BoldCyan=95,227,210 White=248,248,242 BoldWhite=249,248,245
programmieren/git.1634462500.txt.gz · Last modified: by felix
