git add new_file
echo "Mario" -> new_file
git commit -a -m "New file"
echo "Mario & Luigi" > new_file
git commit -a -m "Added Luigi"
Verify you have two separate commits - git log
Squash the two commits you’ve created into one commit
git rebase -i HEAD~2
You should see something similar to:
pick 5412076 New file
pick 4016808 Added Luigi
Change pick
to squash
pick 5412076 New file
squash 4016808 Added Luigi
Save it and provide a commit message for the squashed commit
Answer the following: