User Tools

Site Tools


programmieren:git

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
programmieren:git [2020/01/09 10:04] – [nützliche Kommandos] felixprogrammieren:git [2023/09/01 16:33] (current) – [nützliche Kommandos] felix
Line 1: Line 1:
 ====== Git ====== ====== Git ======
-===== Tutorials ===== 
-  * Derek Banas' [[https://www.youtube.com/playlist?list=PLGLfVvz_LVvQHO1PfyscjIPkNJjgHsLyH|Git Video Tutorial]] 
-  * [[http://explainxkcd.com/wiki/index.php/1597:_Git|Explain xkcd: Git]] 
-  * [[https://try.github.io/|Interaktives Tutorial]] von GitHub 
-  * [[http://tutorialzine.com/2016/06/learn-git-in-30-minutes/|Learn Git in 30 Minutes]] 
-  * [[http://onlywei.github.io/explain-git-with-d3/|Visualizing Git Concepts with D3]] 
-  * [[https://github.com/Roshanjossey/first-contributions/blob/master/translations/README.de.md|First Contribution]] (deutsche Variante inkl. "eigenen Fork aktuell halten"!) 
  
-==== Branches ====+===== Branches =====
   * GitHub: [[https://guides.github.com/introduction/flow/|Understanding the GitHub Flow]]   * 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)   * 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)
Line 19: Line 12:
 ===== nützliche Kommandos ===== ===== nützliche Kommandos =====
   * alle Branches auf dem Server (aka "origin") im aktuellen Repository anzeigen: <code bash>git remote show origin</code>   * alle Branches auf dem Server (aka "origin") im aktuellen Repository anzeigen: <code bash>git remote show origin</code>
 +  * Liste aller Branches (lokal + serverseitig): <code bash>git branch -vva</code>
 +  * lokale Branches löschen, die auf dem Server-Repo bereits gelöscht sind: <code bash>git branch --v | grep "\[gone\]" | awk '{print $1}' | xargs git branch -D
 +</code>
 +
 +==== Zusammenführen ====
 +  * einzelne Commits nacheinander anwenden <code bash>git cherry-pick abc321 efg654 xyz890</code>
 +  * <code bash>git pull --rebase origin master</code>
   * Branch auf Server löschen (nach dem Merge und nachdem man den Feature-Branch lokal gelöscht hat): <code bash>git push origin :branch_name</code>   * Branch auf Server löschen (nach dem Merge und nachdem man den Feature-Branch lokal gelöscht hat): <code bash>git push origin :branch_name</code>
 +
 +==== Darstellung ====
   * Ausgabe der kompletten Historie als Graph: <code bash>git log --color --graph --oneline --all --decorate</code>   * Ausgabe der kompletten Historie als Graph: <code bash>git log --color --graph --oneline --all --decorate</code>
-  * alle Branches auf dem Server (aka “origin”) im aktuellen Repository anzeigen: <code bash>git remote show origin</code> +  * kompaktere Ausgabe: <code bash>git log --oneline</code>
-  * Branch auf Server löschen (nach dem Merge und nachdem man den Feature-Branch lokal gelöscht hat): <code bash>git push origin :branch_name</code>+
  
 +  * Namenskonvention für Branches: ''JIRATICKET-123_oberfunktion_meinfeature''
 +  * neuen Branch anlegen: <code bash>git checkout master
 +git pull
 +git checkout -b DEIN_BRANCH_NAME
 +git push</code>
 +  * Code zwischenlagern, z.B. beim Wechsel des Branches <code bash>git push
 +git stash
 +git pull
 +git stash pop</code>
 ====== Themes ====== ====== 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]]
  
 +<code ini>
 +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
 +</code>
programmieren/git.1578560644.txt.gz · Last modified: by felix

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki