 
                
                    Commit often,
                    
perfect later,
                    
publish once.
                
 
                 
                $ git <verb>
$ git help <verb> $ git <verb> --help
$ git init
$ touch file-1.txt
$ git add file-1.txt
 
                     
                 
                $ git commit -m "first commit"
 
                 
                $ echo "42" > file-1.txt
→ Git erkennt Änderungen anhand des Dateiinhalts
 
                $ git status
 
                $ git diff
$ git difftool
 
                     
                $ git add file-1.txt $ git commit -m "changed file"
$ git commit -am "changed file"
 
                     
                 
                $ git add [-p|--patch] file-1.txt
$ git reset file-1.txt
$ git log
$ git l
[Dd]ebug/
*.dll
$ git tag v1.0.0
 
                $ git stash
$ git stash pop
→ Existiert nur lokal
Vollständige Liste: git-check-ref-format Manual Page
Alles nur Best Practices, wenn es einem gar nicht zusagt, kann man es auch komplett anders machen
$ git branch develop $ git checkout develop
$ git checkout -b develop master
 
                $ git checkout feature/user-mgmt $ git merge develop
 
                 
                 
                 
                $ git clone Remote-URL
 
                $ git fetch
 
                $ git merge
→ Entscheidet selbst, ob es ein recursive oder fast-forward Merge ist
 
                 
                 
                $ git push
→ Immer nur für den Branch, in dem man sich gerade befindet
 
                Erstellen einer Datei mit sechs Dingen, jedes repräsentiert dabei ein Feature
https://github.com/tklepzig/git-alice-[Team-Nummer: 1-6].git
Beispiel Team 1
https://github.com/tklepzig/git-alice-1.git
Six impossible things before breakfast:
1. There's a potion that can make you shrink.
2. And a fruit that can make you grow.
2. And a fruit cake that can make you grow.
3. Animals can talk.
4. Dogs can disappear.
4. Dogs Cats can disappear.
5. There is a place called Wonderland.
6. I can slay the Jabberwocky.
Six impossible things before breakfast: 1. There's a potion that can make you shrink. 2. And a cake that can make you grow. 3. Animals can talk. 4. Cats can disappear. 5. There is a place called Wonderland. 6. I can slay the Jabberwocky.
                    Gommid offdn,
                    
bärfäggd lädor,
                    
bablisch wohnns.