====== git ====== ===== Beispiele ===== ==== Cloning an existing Repository ==== git clone https://github.com/JeffHoogland/MySoftware.git ==== Committing Changes to your Repository ==== git add mynewfile.txt If you have simply updated (or deleted) existing files we simply pass the -u argument to the add argument: git add -u git commit -m “Updated the README file” git push origin ==== Updating a local Git Repository ==== git pull origin ==== Datei aus Repo entfernen ==== git rm Datei Ordner nur rekursiv: git rm -r Ordner ==== Sensible Daten aus Versionshistorie entfernen ==== === BFG Repo-Cleaner === * https://rtyley.github.io/bfg-repo-cleaner/ Beispiel: * Nach https://rtyley.github.io/bfg-repo-cleaner/ (selbst getestet) # Zuerst eine frische Kopie klonen mit dem --mirror-Flag git clone --mirror git://example.com/some-bad-repo.git Mit --mirror wird die volle Datenbank geklont, aber nicht die eigentlichen Dateien. cd some-bad-repo.git java -jar ../bfg --delete-files YOUR-FILE-WITH-SENSITIVE-DATA git reflog expire --expire=now --all && git gc --prune=now --aggressive git push ==== Branches ==== Branch hinzufügen: git branch testing In den Branch wechseln: git checkout testing ==== Entfernte Repos ==== Repo hinzufügen: git remote add origin https://ho2e.de/mygit/UserName/Iptables_fahrrad.wiki.org Repo entfernen: git remote rm origin ===== Konfiguration ===== ==== Passwort zwischenspeichern ==== git config --global credential.helper "cache --timeout=3600" ===== Siehe auch ===== * [[gogs]] * [[gitea]] * [[mediawiki:git|mediawiki:git]] * [[RabbitVCS]] ===== Weblinks ===== * [[https://ho2e.de/wallabag/index.php?view=view&id=177|Unixmen: How To Use Git Commands From Linux Terminal | Unixmen]]