Overview
- Refactoring of my ssg.
- Using
git rebase
to rewrite history on a branch. - Using
git commit --amend
to add things to a previous commit and update a commit message. - using
git merge
What is Code Refactoring?
Refactoring is one of the most important skills for developers. It is the process of restructing the existing code without changing its functionality of the application.
Why Refactoring is important?
- As a software developer we need to make sure our application is always up-to date with the current dependencies and the latest syntax.
- It helps us maintain our application and make it extensible and easy for our readers to understand our code.
- It helps us fix the codes, methods, or classes that are so enlarged.
- It helps us fix areas in code that do not require repeated code.
- It helps us to remove any code that is unnecessary and removing it wonβt be detrimental to the overall functionality of the application.
Rebasing and Squashing
After Refactoring all of my code I have 5 commits in my application.
Before merging my work, i squashed everything in one single commit.
Furthermore, I have amended my commits and successfully merged it to the main branch.
Top comments (0)