Exercise - Branching
Info
git branch
Tips
git switch -c <name>creates a new branch and activates it immediately.git branch -vvshows details about the local branchesgit switch <name>switches the active branchgit merge <branch>integrates the changes frombranchand creates a commit on the active branch.
Initial situation
Step 0 - START
$ cd repo
Step 1 - Create branch
Start in directory git-uebungen/aufgaben/zusammenarbeit-branching/repo.
Create a branch feature-a, edit the file foo and create a commit. Then switch back to main and edit bar there. Show the commit graph.
Step 2 - Merge branch
Start in directory git-uebungen/aufgaben/zusammenarbeit-branching/repo.
Merge feature-a into main and show the commit graph.
repo $ cd ..