Metainformationen zur Seite
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
| anleitung:programmieren:git_grundlagen [18.01.2019 08:53] – [Tabelle] J. Huber | anleitung:programmieren:git_grundlagen [10.07.2025 15:36] (aktuell) – [Allgemeines] J. Huber | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | <hidden Artikel Info> | ||
| - | ---- dataentry ArtikelInfo ---- | ||
| - | Name : Git Grundlagen # | ||
| - | Beschreibung | ||
| - | ProjektNr | ||
| - | Bereich_tagmain | ||
| - | Kategorien_taganleitungs | ||
| - | Webkategorie_taganleitung_web : # | ||
| - | Technologie_prjtechs | ||
| - | Sprache_tagprogramming | ||
| - | Version | ||
| - | ---- | ||
| - | |||
| - | |||
| - | </ | ||
| - | |||
| ====== Git Grundlagen ====== | ====== Git Grundlagen ====== | ||
| Zeile 28: | Zeile 12: | ||
| | git log\\ gitk | Commit Historie anzeigen | | git log\\ gitk | Commit Historie anzeigen | ||
| | git tag [-a] <tag> [-m '< | | git tag [-a] <tag> [-m '< | ||
| + | | git branch < | ||
| + | |||
| + | |||
| + | ==== Allgemeines ==== | ||
| + | |||
| + | === Benutzer und Passwort === | ||
| + | |||
| + | <code bash> | ||
| + | $ git remote set-url origin https:// | ||
| + | </ | ||
| + | |||
| + | <code bash> | ||
| + | $ git remote set-url origin https:// | ||
| + | </ | ||
| + | |||
| + | |||
| + | === Repository auschecken === | ||
| + | <code bash> | ||
| + | $ git clone / | ||
| + | $ git clone benutzername@host:/ | ||
| + | $ git -c http.sslVerify=false clone < | ||
| + | </ | ||
| + | |||
| + | |||
| + | === Repository update vom Parent === | ||
| + | <code bash> | ||
| + | git fetch | ||
| + | git rebase origin/ | ||
| + | </ | ||
| + | |||
| + | |||
| + | === clone subdirectory === | ||
| + | |||
| + | <code bash> | ||
| + | $ git clone src_project/ | ||
| + | $ cd dest_project | ||
| + | $ git filter-branch --prune-empty --subdirectory-filter clone_directory HEAD | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | ==== Submodule ==== | ||
| + | |||
| + | === Add a submodule === | ||
| + | |||
| + | <code bash> | ||
| + | $ cd < | ||
| + | $ git submodule add https:// | ||
| + | $ git submodule init | ||
| + | </ | ||
| + | |||
| + | |||
| + | === Commit and push submodule changes === | ||
| + | |||
| + | <code bash> | ||
| + | $ cd < | ||
| + | $ git add < | ||
| + | $ git commit -m " | ||
| + | $ git push | ||
| + | </ | ||
| + | |||
| + | Then tell your main project to track the updated version: | ||
| + | |||
| + | <code bash> | ||
| + | $ cd < | ||
| + | $ git add < | ||
| + | $ git commit -m " | ||
| + | $ git push | ||
| + | </ | ||
| + | |||
| + | === update submodule === | ||
| + | |||
| + | <code bash> | ||
| + | $ cd < | ||
| + | $ git checkout master | ||
| + | $ git pull # update content | ||
| + | </ | ||
| + | |||
| + | === Disable SSL verification for a specific repository === | ||
| + | |||
| + | <code bash> | ||
| + | $ git config --global http.sslVerify false | ||
| + | </ | ||
| + | === Nur Unterverzeichnis === | ||
| + | |||
| + | <code bash> | ||
| + | $ git clone --no-checkout --depth 1 --sparse --filter=blob: | ||
| + | $ cd $REPO | ||
| + | $ git sparse-checkout init --cone | ||
| + | $ git sparse-checkout add relevant/ | ||
| + | $ git checkout master | ||
| + | </ | ||
| + | |||
| + | ==== Links ==== | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| {{tag> | {{tag> | ||
| + | |||
| ---- struct data ---- | ---- struct data ---- | ||
| + | artikelinfo.name | ||
| + | artikelinfo.beschreibung : Git Grundlagen | ||
| + | artikelinfo.status | ||
| + | artikelinfo.statuslink : Fertig|Fertig | ||
| + | artikelinfo.version | ||
| + | artikelinfo.cats | ||
| + | artikelinfo.catlinks : Anleitung|Anleitung, | ||
| + | artikelinfo.prg | ||
| ---- | ---- | ||