Squashes the Commits

Learn how to squash commits.

Now you (as Alice) are going to squash the commits like you did in the previous chapter.

1	cd ../lgthw_bare_repo_alice
2	git rebase -i $(git rev-list --max-parents=0 HEAD) HEAD

Edit the final commit message so it looks like this:

commits:1-10

Now that it is done, you need to move the master branch pointer to the squashed commit:

3	git branch -f master
4	git checkout master

Note: In this lesson, you are only limited to one terminal.

Get hands-on with 1200+ tech skills courses.