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/10/19 13:41] – [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"!) 
-  * [[https://code.likeagirl.io/tagged/git|Git – Code Like A Girl]] 
  
-==== 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 21: Line 13:
   * 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>   * Liste aller Branches (lokal + serverseitig): <code bash>git branch -vva</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>+  * 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>   * einzelne Commits nacheinander anwenden <code bash>git cherry-pick abc321 efg654 xyz890</code>
   * <code bash>git pull --rebase origin master</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>
  
 +==== 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>
   * kompaktere Ausgabe: <code bash>git log --oneline</code>   * kompaktere Ausgabe: <code bash>git log --oneline</code>
programmieren/git.1603107661.txt.gz · Last modified: by felix

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki