From the course: Use Git Like a Pro by Pearson

Unlock this course with a free trial

Join today to access over 25,600 courses taught by industry experts.

Summary and exercise

Summary and exercise

To recap what we learned in this lesson, so first we talked about stash and we learned how to stash and unstash commits. Then we also saw different ways to squash our commits. Squashing is basically combining multiple commits into one. Then we talked about interactive rebase and we saw the powers of interactive rebase that we can use interactive rebase for amending, squashing, and deleting commits. Finally, we talked about git reflog, and we saw how we can recover our deleted commits and deleted branches. Now moving to the exercise part. As an exercise for part one, create a feature branch. You can call it anything or feature git advanced. Make three commits to the branch. Change the commit message of the second last commit. Also squash the last two commits, and verify using git log if everything is changed correctly. As a part two, make a commit, delete the commit using hard reset. And then try to recover the deleted commit.

Contents