|
@ -70,3 +70,76 @@ Objektorientiert: Methoden/Daten werden hier verkapselt. Vorteile sind: "Bug tes |
|
|
## Wiederholung: |
|
|
## Wiederholung: |
|
|
|
|
|
|
|
|
## Kritik: |
|
|
## Kritik: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# git Commands in Practice |
|
|
|
|
|
|
|
|
|
|
|
[] = Ignore |
|
|
|
|
|
-- = Ist eine Schalter |
|
|
|
|
|
* = Beispiel |
|
|
|
|
|
|
|
|
|
|
|
git [add*] --help |
|
|
|
|
|
|
|
|
|
|
|
--------------------------------------- |
|
|
|
|
|
|
|
|
|
|
|
git init |
|
|
|
|
|
|
|
|
|
|
|
ls -la |
|
|
|
|
|
|
|
|
|
|
|
vi beispiel-datei.txt |
|
|
|
|
|
|
|
|
|
|
|
ls -la .git/ |
|
|
|
|
|
|
|
|
|
|
|
git status |
|
|
|
|
|
|
|
|
|
|
|
git add beispiel-datei.txt |
|
|
|
|
|
|
|
|
|
|
|
git commit -m |
|
|
|
|
|
|
|
|
|
|
|
git add -u |
|
|
|
|
|
|
|
|
|
|
|
git add commiz -m "commit 2" |
|
|
|
|
|
|
|
|
|
|
|
git log |
|
|
|
|
|
|
|
|
|
|
|
git log --oneline |
|
|
|
|
|
|
|
|
|
|
|
git diff |
|
|
|
|
|
|
|
|
|
|
|
--------------------------------------- |
|
|
|
|
|
|
|
|
|
|
|
git add -i |
|
|
|
|
|
|
|
|
|
|
|
p (for patch) |
|
|
|
|
|
|
|
|
|
|
|
Stage this hunk [y,n,q,a,d,e,?] : Was bedeuten diese Buchstaben? |
|
|
|
|
|
|
|
|
|
|
|
--------------------------------------- |
|
|
|
|
|
|
|
|
|
|
|
git reset --hard |
|
|
|
|
|
|
|
|
|
|
|
git branch test1 |
|
|
|
|
|
|
|
|
|
|
|
git checkout (jeden beliebigen commit) / switch (nur branches) |
|
|
|
|
|
|
|
|
|
|
|
git switch test1 |
|
|
|
|
|
|
|
|
|
|
|
git add -u && git commit -m "commit 4" |
|
|
|
|
|
|
|
|
|
|
|
git log --oneline --all |
|
|
|
|
|
|
|
|
|
|
|
git log --oneline --all --graph |
|
|
|
|
|
|
|
|
|
|
|
git merge test1 |
|
|
|
|
|
|
|
|
|
|
|
git reset --hard [commit id] |
|
|
|
|
|
|
|
|
|
|
|
git tag label4 |
|
|
|
|
|
|
|
|
|
|
|
git merge --abort |
|
|
|
|
|
|
|
|
|
|
|
git rebase test2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|