Git Befehle / Cheat sheet / Spickzettel


6/6/2016

Neuen Branch erstellen und wechselnLink to this section

git checkout -b TASK-123

Branch wechselnLink to this section

git checkout branchname

Commit mit Kommentar hinzufügenLink to this section

git commit -m '[Task-123] Kommentar ...'

Git merge (vorher Checkout master)Link to this section

git merge --no-ff Task-123

Branch pushenLink to this section

git push origin Task-123

Zeige welche Dateien in dem Branch zum Master verändert wurdenLink to this section

git diff --name-status maser Task-123

Git Head zurücksetzenLink to this section

git reset --hard HEAD

Git Remote Branch löschenLink to this section

git push origin :BRANCH-123

Git Local Branch löschenLink to this section

git branch -d BRANCH-123

oder

git branch -D BRANCH-123

Git Cherry PickLink to this section

git cherry-pick COMMIT-NUMMER

Git GET all remote branchesLink to this section

for remote in `git branch -r `; do git branch --track $remote; done

Git UPDATE all remote branchesLink to this section

for remote in `git branch -r `; do git checkout $remote ; git pull; done
Comments 💬 & Reactions ✨