3.5 Git with branches

Review of Git

Figure 0.1: Review of Git

What branching looks like in the Git world

Figure 3.2: What branching looks like in the Git world

  • git branch <new branch name>: creates a new branch called <new branch name>
  • git checkout <new branch name>: goes to the branch, <new branch name>
    • git checkout -b <new branch name>: creates and checksout a branch in a single step
  • git log --oneline --graph --decorate --all: shows you the log in relation to all other branches