Files
Wiki/Git HowTo.md
T

1.3 KiB

tags
tags
HowTo

Git HowTo

Push until specific commit

This how you can push until a specific commit (hash):

COMMIT=1f72f3ba764e4ece0cd556779781b414c2efacb6
echo "Summary of the commits diff:"
git --no-pager log origin/main..$COMMIT --oneline
git push origin $COMMIT:main

Fork aktualisieren

In diesem Beispiel haben wir einen Fork:

Einrichten

Repo öffnen.

cd Sozialinfo-Odoo-Build
git switch 16.0

Mit git remote -v im Repo die Remotes anzeigen. Wenn nötig den Upsream hinzufügen:

git remote add upstream git@github.com:Mint-System/Odoo-Build.git

Mit git switch Mint-System-16.0 den Upstream-Branch wechseln. Wenn nötig erstellen:

git switch --oprhan Mint-System-16.0 

Von dort den Upstream-Branch pullen.

git pull upstream 16.0

Ausführen

In Main-Branch wechseln.

git switch 16.0

Files aus dem upstream Branch kopieren.

git checkout Mint-System-16.0 .

Liste der Submoduels zurücksetzen.

git restore --staged .gitmodules
git checkout .gitmodules

Referenzen der Submodule aktualisieren.

task checkout 16.0
task git-submodule-pull

Alles committen.

gaa
gcmsg "feat: Checkout from upstream"
gp