Benutzer-Werkzeuge

Webseiten-Werkzeuge


linux:git

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

Beispiel:

# 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

linux/git.txt · Zuletzt geändert: von move

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki