git_gitea

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
git_gitea [30/03/2025 - 08:08] thommie_netzwissen.degit_gitea [25/04/2025 - 09:09] (aktuell) – [Remote Repos] thommie_netzwissen.de
Zeile 32: Zeile 32:
 ===== Remote Repos ===== ===== Remote Repos =====
  
-"origin" ist das **eigene**  Standard-remote-Repo (z.B. github, gitea). "upstream" ist das Team-Repo. Änderungen aus "origin" werden mit einem Pull Request für das "upstream" Repo angeboten. Von dort wird die Änderungen per "pull" geholt, falls sie akzeptiert wird.+"origin" ist das **eigene** Standard-remote-Repo (z.B. github, gitea). "upstream" ist das Team-Repo. Änderungen aus "origin" werden mit einem Pull Request für das "upstream" Repo angeboten. Von dort wird die Änderungen per "pull" geholt, falls sie akzeptiert wird.
  
 **Kontrolle der Remote Ziele "origin" und "upstream"** **Kontrolle der Remote Ziele "origin" und "upstream"**
- 
 <code> <code>
 git remote -v git remote -v
Zeile 49: 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
 +
 +Aus [[https://www.theserverside.com/video/How-to-use-Gits-set-upstream-push-command|https://www.theserverside.com/video/How-to-use-Gits-set-upstream-push-command]] :
 +
 +===== Fix upstream branch errors with autoSetupRemote =====
 +
 +If you constantly run into Git's fatal "Current branch has no upstream branch" error, and you find issuing the
 + <font inherit/ ;;inherit;;inherit>git push --set-upstream</font>  command constantly to be annoying, you can tell Git to use the set-upstream option automatically whenever you push a new branch to the server.
 +
 +This is done by setting the push.autoSetupRemote option in any of [[https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/Use-Git-config-list-to-inspect-gitconfig-variable-settings|Git's configuration files]].
 +
 +===== How to set push.autoSetupRemote =====
 +
 +To tell Git to automatically create new branches in remote repositories upon a push, simply issue the following command:
 + <font inherit/ ;;inherit;;inherit>git config --global --add --bool **push.autoSetupRemote** true</font>
 +
 +With that configuration setting in place, you'll never have to push with the
 + <font inherit/ ;;inherit;;inherit>git push --set-upstream</font>  command ever again.
 +
  
 ===== öffentliche Repos: Kollaboration ===== ===== öffentliche Repos: Kollaboration =====
  • git_gitea.1743322101.txt.gz
  • Zuletzt geändert: 30/03/2025 - 08:08
  • von thommie_netzwissen.de