DEV Community

Vishnu Das Puthukudi
Vishnu Das Puthukudi

Posted on

Squashing and Amending Git Commits- OSD600/LAB-5

In the LAB 5, we are discussing about git rebase, git amend and new modification to the code by the 3 changes

  • We started our journey by improving the variable name in the Text2page.py code in this first commit. A key component of maintainable and effective programming is the use of clear, descriptive variable names: Improved variable name for the Text2page.py function (Commit 1)

  • We got into the specifics of refactoring in the second commit. Markdown material and special characters can be handled by the HTML production code with ease. In addition, as a crucial first step in project improvement, we eliminated superfluous TOML settings and enhanced our file type handling: Commit 2: The HTML generation was refactored to properly handle special characters and Markdown text. eliminated extraneous TOML settings. updated code for improved handling of file types.

  • Version control was emphasized in the third commit. The handling of tool versions was made simpler by removing the global VERSION variable and carefully positioning the tool version within the main function: Commit 3: Display the tool version in the main function and remove the global VERSION variable.

We used rebase to organize several commits into a more logical and seamless sequence as we progressed through the experiment. We were able to restructure our work using rebasing, bringing the core of many contributions together into a single, complete unit. This simplifying improves the transparency of our code's growth while also making the commit history simpler. When we recognized the value of concise commit statements, the technique of revising commits became clear. Collaboration in open source development depends on concise and informative commit messages. We improved and updated earlier commit messages using the "amend" functionality to make sure that each commit not only represented code changes but also clearly communicated the nature and context of the work done.

Top comments (0)