DEV Community


Git rebase

henryzerocool profile image Phan Hieu Nguyen ・1 min read


I experienced git rebase command with some small commits.
Repo link
Merge commit


I my understanding, git rebase can be uses to shorten git log or rewrite git history

The goals

Since the goals is mainly to experience rebasing the repos, I just made a few small commits and then combined those into one. I made some changes by renaming variables to be more clear, adjusting if else statements so it is most logical, and most of it was cleaning up the code. At this time, I tried to refactor the projects, but it seems very hard in the sense that my functions are being used once, and it very simple. So I don't see the point of refactor right now.
A random thought on rebase. When I started working as junior, my first objective was to understand the flow of the project I'm working on. I looked at commits tree to select a commit and it was huuge. I tried to read it by picking commits and after a while, I lost track. I feel like they forgot to rebase the project or did not do it enough. It was just a very big trees. So I think this is the very good feature to help junior like me to catch up with the work


Editor guide