Git: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Nick (Diskussion | Beiträge) |
Nick (Diskussion | Beiträge) (→Config) |
||
| Zeile 1: | Zeile 1: | ||
= Häufige Befehle = | = Häufige Befehle = | ||
== Config == | == Config == | ||
git config --global user.name "Your Name" | |||
git config --global user.email "your_email@example.com" | git config --global user.email "your_email@example.com" | ||
git config --global core.editor "vim" | git config --global core.editor "vim" | ||
== Clone == | == Clone == | ||
Version vom 23. Februar 2022, 11:28 Uhr
Häufige Befehle
Config
git config --global user.name "Your Name" git config --global user.email "your_email@example.com" git config --global core.editor "vim"
Clone
git clone <Repo-Pfad> git clone --branch <Branch-Name> <Repo-Pfad> git clone --recurse-submodules <Repo-Pfad> git clone --branch <Branch-Name> --recurse-submodules <Repo-Pfad>
Branch
git checkout <Branch-Name> #branch auschecken git checkout -b iss53 #Neuen branch anlegen und auschecken git checkout -- <Datei> #Änderung verwerfen
Stage/Commit
git add . #Stagen git reset HEAD <Datei> #Staging verwerfen
git commit -m "commit Text" git reset --soft HEAD^ #Commit Rückgängig machen git reset --hard HEAD^ #Commit verwerfen
Submodule
git submodule add -b master <Repo-Pfad> <lokaler-Pfad> git submodule init git submodule update git submodule update --init --recursive # init + update + untermodule
git clone --recurse-submodules https://path