#!/usr/bin/bash

# Create new git repository
git init --initial-branch=master mergeFastForward
cd mergeFastForward

# Commit on master branch
echo "A1" > A1.txt; git add A1.txt; git commit -m "A1"

# Commits on branch B
git switch -c B
echo "B1" > B1.txt; git add B1.txt; git commit -m "B1"
echo "B2" > B2.txt; git add B2.txt; git commit -m "B2"
echo "B3" > B3.txt; git add B3.txt; git commit -m "B3"

# Review graph
git log --graph --decorate

# Switch to master branch
git switch master

# Merge branch B (Fast-forward)
git merge B

# Review graph
git log --all --graph --decorate
