Lab 5
This week we were taught how to rebase and squash commits so that we can keep our work trees as clean as possible.
To test our new found knowledge of rebasing and squashing we were tasked to refactor our Site Generator code and improve it in a few separate commits so that when we were done with the task of refactoring we could then take these separate commits of improvements and squash them all together.
The improvements I made for my program specifically are as follows:
- I changed a confusing variable name that Arryell pointed out should be changed when working with my last lab
- I changed the name of my main class from Sitegen.py to main.py for some additional clarity
- I changed the directory structure of my project to include a src folder for all of my .py files instead of just having them on the project's root
- Instead of working with strings and concatenating them with the '/' character to create paths I started using the pathlib library so that it would work across operating systems in all cases
After making all of the improvements I rebased them with the -i option to start an interactive rebase and I left the latest commit as the pick and squashed the rest.
Finally just before merging with main and pushing I commited an amendment to the message of my previous commit of commits to make it better reflect what my commit was about, and to summarize it I wrote that it was a set of commits to refactor my application.
Top comments (0)