public_v6:git
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
| public_v6:git [2016/12/12 11:32] – [Fork mit originalem Repository abgleichen] admin | public_v6:git [2023/07/20 10:51] (aktuell) – [Verschiedenes] admin | ||
|---|---|---|---|
| Zeile 34: | Zeile 34: | ||
| <code bash> | <code bash> | ||
| git log | git log | ||
| - | git log --online | + | git log --oneline |
| </ | </ | ||
| | | ||
| Zeile 78: | Zeile 78: | ||
| * http:// | * http:// | ||
| ====== Rebase ====== | ====== Rebase ====== | ||
| - | (z.B. einen Branch | + | Um z.B. einen Branch |
| <code bash> | <code bash> | ||
| git checkout < | git checkout < | ||
| - | git rebase -i master | + | git rebase |
| </ | </ | ||
| + | http:// | ||
| ===== Fork mit originalem Repository abgleichen ===== | ===== Fork mit originalem Repository abgleichen ===== | ||
| <code bash> | <code bash> | ||
| - | git remote | + | git remote |
| + | </ | ||
| + | |||
| + | Falls '' | ||
| + | '' | ||
| + | |||
| + | Mit den folgenden Befehlen kann zwischen HTTPS und SSH umgeschalten werden:\\ | ||
| + | <code bash>git remote set-url origin git@github.com: | ||
| + | git remote set-url origin https:// | ||
| + | </ | ||
| + | |||
| + | Fetch alle Branches von Remote (remote-tracking), | ||
| + | <code bash> | ||
| git fetch upstream | git fetch upstream | ||
| - | git rebase upstream/ | ||
| - | git push (origin) (-f) | ||
| </ | </ | ||
| - | (In manchen Anleitungen wird '' | + | Stelle sicher, im master-Branch zu sein: |
| + | <code bash> | ||
| + | git checkout master | ||
| + | </ | ||
| + | |||
| + | Rewrite des '' | ||
| + | am Kopf von '' | ||
| + | <code bash> | ||
| + | git rebase upstream/ | ||
| + | </ | ||
| + | |||
| + | Nach dem //rebase// kann das Ergebnis per //force push// in das eigene geforkte Repository auf GitHub hochgeladen werden: | ||
| + | <code bash> | ||
| + | git push f origin master | ||
| + | </ | ||
| + | |||
| + | (:!: In manchen Anleitungen wird '' | ||
| ===== Verschiedenes ===== | ===== Verschiedenes ===== | ||
| + | === Zugriff auf 2-Faktor gesichertes Repository von der Kommandozeile === | ||
| + | |||
| + | * https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | |||
| + | |||
| ==== Tracking: ==== | ==== Tracking: ==== | ||
| Zeile 103: | Zeile 137: | ||
| * http:// | * http:// | ||
| ==== Wer bin ich?: ==== | ==== Wer bin ich?: ==== | ||
| - | git config --global user.email " | + | <code bash> |
| - | | + | git config --global user.email " |
| + | git config --global user.name " | ||
| + | </ | ||
| + | |||
| + | ==== Clonen per SSH: ==== | ||
| + | |||
| + | <code bash> | ||
| + | git clone git@github.com: | ||
| + | </ | ||
| ==== Stuff ==== | ==== Stuff ==== | ||
| Zeile 110: | Zeile 152: | ||
| * https:// | * https:// | ||
| + | |||
| + | ==== Neues Repository von der Kommandozeile erzeugen ==== | ||
| + | |||
| + | <code bash> | ||
| + | echo "# Titelzeile" | ||
| + | git init | ||
| + | git add README.md | ||
| + | git commit -m "first commit" | ||
| + | git remote add origin git:// | ||
| + | git push -u origin master | ||
| + | </ | ||
public_v6/git.1481542335.txt.gz · Zuletzt geändert: (Externe Bearbeitung)
