Metainformationen zur Seite
Dies ist eine alte Version des Dokuments!
Git Grundlagen
Übersicht
| Befehl | Beschreibung | Beispiel |
|---|---|---|
| git init | Neues lokales Repository erstellen | |
| git clone <url> [<ZielVerzeichnis>] git clone <path> [<ZielVerzeichnis>] | Kopie eines existierenden Git Repositorys anlegen | |
| git submodule add <repository> <path> | In einem Unterverzeichnis eines Git-Repositories eine Referenz auf ein anderes Git-Repositories eingebetten | |
| git add <file> [<file> …] | Dateien zur Versionsverwaltung hinzufügen | |
| git commit -m '<Beschreibung>' git commit –amend | Änderungen in die Arbeitskopie übermitteln bzw. korrigieren | |
| git status | Zustand der Dateien prüfen | |
| git log gitk | Commit Historie anzeigen | |
| git tag [-a] <tag> [-m '<beschreibung>'] | Neuen Tag anlegen |
Submodule
Commit and push submodule changes
cd project/path/to/submodule $ git add <stuff> $ git commit -m "comment" $ git push
Then tell your main project to track the updated version:
$ cd project $ git add path/to/submodule $ git commit -m "updated my submodule" $ git push
update submodule
$ git checkout master # checkout desired branch $ git pull # update content $
Diskussion