====== Git ======
===== Branches =====
* GitHub: [[https://guides.github.com/introduction/flow/|Understanding the GitHub Flow]]
* Atlassian: [[https://www.atlassian.com/git/tutorials/using-branches|Using Branches]], [[https://www.atlassian.com/git/tutorials/comparing-workflows|Comparing Workflows]] (inkl. Feature Branch Workflow)
* [[https://blog.seibert-media.net/blog/2014/03/20/git-workflows-der-feature-branch-workflow-teil-1/|Der Feature-Branch-Workflow]]
* [[http://www.aspnetzone.de/blogs/juergengutsch/archive/2015/04/13/working-with-git-part-1.aspx|Git unter Windows]] mit [[http://cmder.net/|cmder]]
* Git SCM: [[https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository|2.2 Git Basics - Recording Changes to the Repository]]
===== Referenzen =====
* [[https://www.alexkras.com/getting-started-with-git/|Git Cheat Sheet]] von AlexKras.com
* [[http://marklodato.github.io/visual-git-guide/index-de.html|Ein grafischer Spickzettel für Git]]
===== 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
* lokale Branches löschen, die auf dem Server-Repo bereits gelöscht sind: git branch --v | grep "\[gone\]" | awk '{print $1}' | xargs git branch -D
==== 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
* auf GitHub: [[https://github.com/thehoneymad/mintty-monokai-mod/blob/master/base16-monokai-mod.minttyrc|Link1]], [[https://github.com/oumu/mintty-color-schemes/blob/master/base16-monokai-mod.minttyrc|Link2]]
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