Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung | Nächste ÜberarbeitungBeide Seiten der Revision | ||
git_gitea [01/10/2022 - 10:26] – gelöscht - Externe Bearbeitung (Unknown date) 127.0.0.1 | git_gitea [01/10/2022 - 10:26] – ↷ Seitename wurde von git auf git_gitea geändert thommie4 | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
+ | ====== GIT und GITHUB Basisdoku ====== | ||
+ | |||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | |||
+ | ===== GIT ===== | ||
+ | |||
+ | ==== Basisfunktionen & Lokale Instanz ==== | ||
+ | |||
+ | - Arbeitskopie = die echten Dateien, dynamisch | ||
+ | - '' | ||
+ | - HEAD zeigt immer auf letzten Commit. Ein '' | ||
+ | |||
+ | Initialisierung: | ||
+ | |||
+ | < | ||
+ | git init | ||
+ | git add . | ||
+ | </ | ||
+ | |||
+ | Danach initialer Commit, um den aktuellen Stand im HEAD aufzunehmen | ||
+ | |||
+ | '' | ||
+ | |||
+ | |||
+ | ==== Remote Repos: Verknüpfen einer lokalen Instanz mit Github ==== | ||
+ | |||
+ | **Kontrolle der Remote Ziele " | ||
+ | |||
+ | < | ||
+ | git remote -v | ||
+ | |||
+ | origin | ||
+ | origin | ||
+ | upstream | ||
+ | upstream | ||
+ | </ | ||
+ | |||
+ | Nach dem Anlegen eines eigenen Repos auf github kann man das lokale Repo mit einem Repo auf github verknüpfen. | ||
+ | |||
+ | * origin = persönliches git Repo auf Github. Die kann ein privater Fork eines öffentlichen Repos auf github sein. | ||
+ | |||
+ | Anders bei öffentlichen Repos: Öffentliche Repos werden zunächst geforkt, also eine Kopie im eigenen Repo-Speicher als " | ||
+ | |||
+ | * upstream = öffentliches Github Repo (z.B. [[https:// | ||
+ | |||
+ | Lokale Instanz: hinzufügen des entfernten " | ||
+ | |||
+ | < | ||
+ | git remote add origin git@github.com: | ||
+ | git push -u origin master | ||
+ | </ | ||
+ | |||
+ | Analog geht das Verbinden des öffentlichen Repos als " | ||
+ | |||
+ | < | ||
+ | git remote add upstream '' | ||
+ | </ | ||
+ | |||
+ | ==== Synchronisation lokales Repo mit entfernten ==== | ||
+ | |||
+ | **pushen** | ||
+ | |||
+ | '' | ||
+ | |||
+ | '' | ||
+ | |||
+ | **abholen** | ||
+ | |||
+ | '' | ||
+ | |||
+ | '' | ||
+ | |||
+ | |||
+ | ===== Github: entferntes Repo klonen ===== | ||
+ | |||
+ | Lokale Kopie des aktuellen Arbeitsstandes auf github anlegen | ||
+ | |||
+ | '' | ||
+ | |||
+ | '' | ||
+ | |||
+ | ====== Update des Fork auf Github ====== | ||
+ | |||
+ | Das geht über das **lokale** | ||
+ | |||
+ | Updates von Upstream holen | ||
+ | |||
+ | < | ||
+ | |||
+ | </ | ||
+ | |||
+ | Zum master wechseln | ||
+ | |||
+ | < | ||
+ | |||
+ | </ | ||
+ | |||
+ | Master mit upstream mergen | ||
+ | |||
+ | < | ||
+ | |||
+ | </ | ||
+ | |||
+ | Danach push auf den fork setzen. | ||
+ | |||
+ | ===== Branches ===== | ||
+ | |||
+ | Wo bin ich (aktueller Branch) | ||
+ | |||
+ | < | ||
+ | git show branch | ||
+ | </ | ||
+ | |||
+ | Alle Branches im Repo zeigen | ||
+ | |||
+ | < | ||
+ | git branch -a | ||
+ | |||
+ | main | ||
+ | * master | ||
+ | remotes/ | ||
+ | remotes/ | ||
+ | remotes/ | ||
+ | </ | ||
+ | |||
+ | Zum anderen Branch wechseln | ||
+ | |||
+ | < | ||
+ | git checkout master | ||
+ | </ | ||
+ | |||
+ | Freier Wechsel zu Branch | ||
+ | |||
+ | '' | ||
+ | |||
+ | Lokal erzeugten Branch im remote Repo verfügbar machen | ||
+ | |||
+ | '' | ||
+ | |||
+ | synchronisiert in den Master Branch vom Remote Repo (origin)." | ||
+ | |||
+ | Neuen Branch erstellen und zu diesem wechseln | ||
+ | |||
+ | '' | ||
+ | |||
+ | Branch löschen | ||
+ | |||
+ | '' | ||
+ | |||
+ | Download eines Branch (vmware-host-modules) | ||
+ | |||
+ | '' | ||
+ | |||
+ | danach | ||
+ | |||
+ | '' | ||
+ | |||
+ | |||
+ | ====== update & merge ====== | ||
+ | |||
+ | '' | ||
+ | |||
+ | Holt Änderungen von Remote (fetch) **und führt sie mit dem lokalen Stand zusammen** | ||
+ | |||
+ | '' | ||
+ | |||
+ | ==== Upstream nach fork mergen ==== | ||
+ | |||
+ | Lokales Ziel | ||
+ | |||
+ | < | ||
+ | git checkout //master// | ||
+ | |||
+ | </ | ||
+ | |||
+ | Welche branch von Upstream soll wohin geholt werden? | ||
+ | |||
+ | < | ||
+ | git pull git@github.com: | ||
+ | |||
+ | </ | ||
+ | |||
+ | Danach commit, review und push auf den fork bei Github | ||
+ | |||
+ | ===== Wenn etwas ganz schiefgeht ===== | ||
+ | |||
+ | '' | ||
+ | |||
+ | setzt die lokalen Änderungen auf den letzten HEAD Stand. Änderungen, | ||
+ | |||
+ | Hard Reset = Zurück auf den letzten Stand vom entfernten Repository: | ||
+ | |||
+ | '' | ||
+ | |||
+ | ====== Pull requests ====== | ||
+ | |||
+ | Pull requests let you tell others about changes you've pushed to a branch in a repository on GitHub. Once a pull request is opened, you can discuss and review the potential changes with collaborators and add follow-up commits before your changes are merged into the base branch. | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | ====== Basis Konfiguration eines Repos ====== | ||
+ | |||
+ | |< | ||
+ | git config -global user.name [name] | ||
+ | |||
+ | git config -global user.email [email] | ||
+ | |||
+ | git config -global core.editor [editor] | ||
+ | |||
+ | </ | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | | | | | ||
+ | |||
+ | ====== Atom ====== | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | Globale Tastenkürzel | ||
+ | |||
+ | ^Kürzel ^was machts ^Anmerkung | | ||
+ | |Ctrl-Shift-P |Kommando-Palette | | | ||
+ | |Ctrl-T oder Ctrl-P |Suche nach Dateiname im Projekt | | | ||
+ | |Ctrl-B |Suche nach Text in offenen Dateien im Projekt | | | ||
+ | |Ctrl-F |Suche nach Text in allen offenen Dateien | | | ||
+ | |Ctrl-Shift-F |Suche nach Text in alle Dateien im Projekt | | | ||
+ | |||
+ | ===== Atom Fenster ausserhalb des sichtbaren Bereiches ===== | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | Workaround: | ||
+ | |||
+ | '' | ||
+ | |||
+ | oder | ||
+ | |||
+ | ALT+TAB–> | ||
+ | |||
+ | oder für Windows | ||
+ | |||
+ | * Select the Atom window (using Alt-Tab or mouse) | ||
+ | * Open the context menu with Alt-Space. | ||
+ | * Select move using “m” | ||
+ | * Press any of the arrow keys. | ||
+ | * The Atom window will now be possible to drag back to the main monitor using the mouse. | ||
+ | |||
+ | ====== Markdown ====== | ||
+ | |||
+ | https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | ===== ASCIIDoc ===== | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | ==== Admonition ==== | ||
+ | |||
+ | < | ||
+ | |||
+ | Here are the other built-in admonition types: | ||
+ | |||
+ | TIP: Pro tip… | ||
+ | |||
+ | IMPORTANT: Don't forget… | ||
+ | |||
+ | WARNING: Watch out for… | ||
+ | |||
+ | CAUTION: Ensure that… </ | ||
+ | |||
+ | ==== Formatierung ==== | ||
+ | |||
+ | < | ||
+ | |||
+ | italic _constrained_ & __un__constrained | ||
+ | |||
+ | bold italic *_constrained_* & **__un__** | ||
+ | |||
+ | monospace `constrained` & ``un``constrained | ||
+ | |||
+ | monospace bold `*constrained*` & ``**un**``constrained | ||
+ | |||
+ | monospace italic `_constrained_` & ``__un__``constrained | ||
+ | |||
+ | monospace bold italic `*_constrained_*` & ``**__un__**``constrained </ | ||
+ | |||
+ | Document header | ||
+ | |||
+ | < | ||
+ | |||
+ | My document provides… </ | ||
+ | |||
+ | ==== Überschriften ==== | ||
+ | |||
+ | '' | ||
+ | |||
+ | ==== Listen ==== | ||
+ | |||
+ | Unordered, basic[[https:// | ||
+ | |||
+ | < | ||
+ | * Edgar Allen Poe | ||
+ | * Sheri S. Tepper | ||
+ | * Bill Bryson | ||
+ | </ | ||
+ | |||
+ | Unordered, basic (alt)[[https:// | ||
+ | |||
+ | < | ||
+ | - Edgar Allen Poe | ||
+ | - Sheri S. Tepper | ||
+ | - Bill Bryson | ||
+ | </ | ||
+ | |||
+ | Nested Lists: To nest one list within another, indent each item in the sublist by four spaces. You can also nest other elements like paragraphs, blockquotes or code blocks. | ||
+ | |||
+ | |||
+ | ===== Gitea ===== | ||
+ | |||
+ | Git with a cup of tea - A painless self-hosted Git service | ||
+ | |||
+ | https:// | ||
+ | |||
+ | https:// | ||
+ | |||
+ | https:// | ||
+ | |||
+ | Upgrade script: / | ||
+ | |||
+ | |||