Starting...
This lab is to practice about the advanced skills on git such as rebase, squashing, and amend. What I had done before I learned this way to handle my incorrect committed message was like that, just doing reset and doing it again. I can say that I really love this skill especially about rebase and interactive amend mode.
Progressing...
Actually, This task is very simple and I understand the main purpose is not refactoring my code, but using the advanced git skills for my future journal in the code world. With the instruction of osd600, I made 3 commit messages to try to rebase for squashing three messages.
pick b77bdc5 applied three refactoring like used function, getting rid of global variables and removing duplicated regex and rename the methods
squash 28059dd got rid of global variables
squash 66e551b removed duplicated regex and rename the methods
# Rebase 367104a..66e551b onto 367104a (3 commands)
#
# Commands:
# p, pick = use commit
# r, reword = use commit, but edit the commit message
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
# f, fixup = like "squash", but discard this commit's log message
# x, exec = run command (the rest of the line) using shell
# d, drop = remove commit
#
# These lines can be re-ordered; they are executed from top to bottom.
#
# If you remove a line here THAT COMMIT WILL BE LOST.
#
# However, if you remove everything, the rebase will be aborted.
#
# Note that empty commits are commented out
My log message after rebase.
The good thing is that after rebasing my all of commit messages with squashing, I also can modify my commit message with the command, git commit --amend, which is modifying the last commit message.
Refactoring http-parser to improve code maintainability:
* used function instead of variable
* got rid of global variables
* removed duplicated regex and rename the methods
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# Date: Fri Oct 23 00:38:43 2020 -0400
#
# On branch refactoring-duplication
# Your branch and 'origin/refactoring-duplication' have diverged,
# and have 1 and 3 different commits each, respectively.
# (use "git pull" to merge the remote branch into yours)
#
# Changes to be committed:
# modified: index.js
# modified: service/fileService.js
#
Comments
Post a Comment