!SLIDE center # Branches ![branching](branching.jpg) !SLIDE commandline incremental $ git branch newbranch $ git checkout newbranch Switched to branch 'newbranch' $ git branch master * newbranch !SLIDE commandline $ git branch newbranch ← legt neue Datei an $ git checkout newbranch Switched to branch 'newbranch' $ git branch master * newbranch !SLIDE commandline $ git branch newbranch $ git checkout newbranch ← Änderungen im akt. Verzeichnis Switched to branch 'newbranch' $ git branch master * newbranch !SLIDE commandline $ git checkout -b newbranch Switched to branch 'newbranch' !SLIDE center ![parent snapshot](git-parent-snapshot.png) !SLIDE center ![branched snapshot](git-branched-head.png) !SLIDE commandline $ echo "another line" >> README $ git commit -am 'another commit' ... $ !SLIDE center ![branched head](git-branched-head.png) !SLIDE center ![branched newcommit](git-branched-newcommit.png) !SLIDE center # Merging !SLIDE command $ git checkout master $ git merge newbranch !SLIDE command $ git branch -d newbranch