Practice git rebase in Lab5

 This week we start to how to use git rebase in open source project. Git rebase is used to rewrite git history and make your project a bit of a clean-up. 

In the lab5, I will try to promote my test link project to be more concise. Fist of all, I split my index.js file into two separated files, index.js file and read-file.js file. The read-file.js file will include all of the logic to read a file. After completing the changes, I try to execute the project and it works well.



Second, I modify the code about showing the version of the project to make it more readable.

After modifying the code, I test the code well and make a commit.


Third, I change the code about showing the help information. Then, I test the code and make a commit.


After completing above steps, I use git rebase master -i command to squash everything into a single commit. Then, the three commits are combined into one commit.


I also use git commit --amend command to change the combined commit message better.


At last, I use git merge command to merge the new branch to master branch. Then, I push the commit into my GitHub repo. 




Comments

Popular posts from this blog

Update the process about Release 0.4

Choose a project in Release 0.4

Open source development course