Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
git_gitea [25/11/2023 - 12:26] – admin | git_gitea [25/04/2025 - 09:09] (aktuell) – [Remote Repos] thommie_netzwissen.de | ||
---|---|---|---|
Zeile 14: | Zeile 14: | ||
Initialisierung: | Initialisierung: | ||
- | < | ||
+ | < | ||
git init | git init | ||
git add . | git add . | ||
Zeile 25: | Zeile 25: | ||
'' | '' | ||
- | ===== Remote Repos: Verknüpfen einer lokalen Instanz mit Remote Instanzen ===== | + | Nachträgliches Ändern eines commit Textes |
- | " | + | '' |
- | **Kontrolle der Remote Ziele " | ||
+ | ===== Remote Repos ===== | ||
+ | |||
+ | " | ||
+ | |||
+ | **Kontrolle der Remote Ziele " | ||
< | < | ||
git remote -v | git remote -v | ||
Zeile 44: | Zeile 48: | ||
* origin = persönliches git Repo auf Github. Die kann ein privater Fork eines öffentlichen Repos auf github sein. | * origin = persönliches git Repo auf Github. Die kann ein privater Fork eines öffentlichen Repos auf github sein. | ||
+ | * upstream = Master repo, eigene commits landen dort per Pull Request | ||
- | Anders bei öffentlichen | + | Aus [[https:// |
+ | |||
+ | ===== Fix upstream branch errors with autoSetupRemote ===== | ||
+ | |||
+ | If you constantly run into Git's fatal " | ||
+ | < | ||
+ | |||
+ | This is done by setting the push.autoSetupRemote option in any of [[https:// | ||
+ | |||
+ | ===== How to set push.autoSetupRemote ===== | ||
+ | |||
+ | To tell Git to automatically create new branches in remote repositories upon a push, simply issue the following command: | ||
+ | < | ||
+ | |||
+ | With that configuration setting in place, you'll never have to push with the | ||
+ | < | ||
+ | |||
+ | |||
+ | ===== öffentliche | ||
+ | |||
+ | Öffentliche Repos werden zunächst geforkt, also eine Kopie im eigenen Repo-Speicher als " | ||
* upstream = öffentliches Github Repo (z.B. [[https:// | * upstream = öffentliches Github Repo (z.B. [[https:// | ||
Zeile 121: | Zeile 146: | ||
====== Branches ====== | ====== Branches ====== | ||
+ | |||
+ | Branch erzeugen | ||
+ | |||
+ | < | ||
+ | git checkout -b iss53 | ||
+ | </ | ||
Wo bin ich (aktueller Branch) | Wo bin ich (aktueller Branch) | ||
- | <file> | + | <code> |
git branch | git branch | ||
- | + | </code> | |
- | </file> | + | |
Alle Branches im lokalen und im remote Repo zeigen (remotes) | Alle Branches im lokalen und im remote Repo zeigen (remotes) | ||
Zeile 139: | Zeile 169: | ||
remotes/ | remotes/ | ||
remotes/ | remotes/ | ||
+ | </ | ||
+ | Nur die remotes zeigen | ||
+ | |||
+ | < | ||
+ | git branch -r | ||
</ | </ | ||
Zeile 146: | Zeile 181: | ||
< | < | ||
git checkout master | git checkout master | ||
- | |||
</ | </ | ||
Zeile 308: | Zeile 342: | ||
</ | </ | ||
- | ====== SSH ====== | + | ====== |
Mehrere ssh Key benutzen: | Mehrere ssh Key benutzen: | ||
Zeile 322: | Zeile 356: | ||
< | < | ||
- | < | + | < |
#HostName gitea.netzwissen.de | #HostName gitea.netzwissen.de | ||
Zeile 343: | Zeile 377: | ||
< | < | ||
- | < | + | < |
| | ||
bare = false | bare = false |