add more commit examples

This commit is contained in:
Marko Cubela 2017-10-14 11:43:53 +02:00
parent 4ffa934f61
commit 340a7b6d78
No known key found for this signature in database
GPG Key ID: 62A309255173AAD5

View File

@ -205,6 +205,12 @@ Speichert die aktuellen Inhalte des Index in einen neuen *Commit*. Dieser Commit
```bash
# Commit mit Beschreibung erstellen.
$ git commit -m "Added multiplyNumbers() function to HelloWorld.c"
# Alle veränderten oder gelöschten Dateien außer neue Dateien werden gestaged und dann wird ein Commit erstellt.
$ git commit -a -m "Modified foo.php and removed bar.php"
# Ändert den letzten Commit (der letzte Commit wird mit einem neuen Commit ersetzt)
$ git commit --amend -m "Correct message"
```
### diff