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 [15.01.2019 15:56] – [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 | + | |
| - | ---- | + | |
| + | ===== Übersicht ===== | ||
| - | </hidden> | + | ^ Befehl |
| + | | git init | Neues lokales Repository erstellen | ||
| + | | git clone <url> [< | ||
| + | | git submodule add < | ||
| + | | git add < | ||
| + | | git commit -m '< | ||
| + | | git status | ||
| + | | git log\\ gitk | Commit Historie anzeigen | ||
| + | | git tag [-a] <tag> [-m '< | ||
| + | | git branch < | ||
| - | ====== Git Grundlagen ====== | ||
| - | ===== Übersicht ===== | + | ==== Allgemeines |
| - | ^ Befehl | + | === Benutzer und Passwort === |
| - | | git init | Neues lokales | + | |
| - | | git clone <url> [<ZielVerzeichnis>] | Kopie eines existierenden Git Repositorys anlegen | + | <code bash> |
| - | | git submodule add <repository> <path> | In einem Unterverzeichnis eines Git-Repositories eine Referenz auf ein anderes Git-Repositories eingebetten | + | $ git remote set-url origin https:// |
| - | | git add <file> [<file> ...] | Dateien zur Versionsverwaltung hinzufügen | + | </ |
| - | | git commit -m '<Beschreibung>' | + | |
| - | | git status | + | <code bash> |
| - | | git log\\ gitk | Commit Historie anzeigen | + | $ git remote set-url origin https:// |
| - | | git tag [-a] <tag> [-m '< | + | </ |
| + | |||
| + | |||
| + | === Repository | ||
| + | <code bash> | ||
| + | $ git clone / | ||
| + | $ git clone benutzername@host:/ | ||
| + | $ git -c http.sslVerify=false | ||
| + | </code> | ||
| + | |||
| + | |||
| + | === Repository update vom Parent === | ||
| + | <code bash> | ||
| + | git fetch | ||
| + | git rebase origin/ | ||
| + | </code> | ||
| + | |||
| + | |||
| + | === clone subdirectory === | ||
| + | |||
| + | <code bash> | ||
| + | $ git clone src_project/ | ||
| + | $ cd dest_project | ||
| + | $ git filter-branch | ||
| + | </code> | ||
| + | |||
| + | |||
| + | |||
| + | ==== Submodule ==== | ||
| + | |||
| + | === Add a submodule === | ||
| + | |||
| + | <code bash> | ||
| + | $ cd < | ||
| + | $ git submodule add https://git.evenhausen.de/< | ||
| + | $ git submodule init | ||
| + | </ | ||
| + | |||
| + | |||
| + | === Commit and push submodule changes === | ||
| + | |||
| + | <code bash> | ||
| + | $ cd < | ||
| + | $ git add < | ||
| + | $ git commit -m " | ||
| + | $ git push | ||
| + | </code> | ||
| + | |||
| + | 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 | ||
| + | </code> | ||
| + | |||
| + | ==== 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 | ||
| ---- | ---- | ||