Ever heard of that awesome 90's kid shows called Power Rangers? Where they had these awsome Dino-robots called Dinozords which were like Tyrannosaurus, Mastodon, Triceratops, Sabertooth Tiger, and Pterodactyl, then at the end they had to come to gether and had like a combination of a giant mega robot? A MEGAZORD, no no no it's a DINO MEGAZORD! yeah that one. Well that's how it felt like working on this lab this week. We need to focus on Rebase, commit ammend and squash. I guess we can call it refactoring.
So here's the thing I was lucky enough to learn this this earlier this week due to some problem that i ended up making and made a whole mess!! I had to request and close like 2/3 PR because of it. Sad part is the issue wasn't even that hard.
HERE WE GO AGAIN!
So let's start first with the main issue Clean up code this was simple enough remove the unused commented out code. Okay here me out the reason I took this was because I had like 7 PR at the time and I wanted to slowdown a bit. So I fixed the code and requested the first PR I finished it quickly but then they asked me to do sign the commit. So I did that before but this time it wasn't working so I kept comitting and comitting and then suddenly I had to close it and created a second PR same thing happened and on the final PR thank goodness it finnaly worked I ended up multiple commit. the way I did it was I searched online how to not mess with the branch so I encountered rebase i thought I was going to use it for this PR but nope! I had to go and study cherry-pick which was basically choosing a commit from one branch and applying it to another.
Where was I?
Oh yeah going back to the lab I cleaned the code up and made a global function, after woking on multiple big projects I decided to that Waypoint was really really messy so I cleaned up the code enhanced a few things. downgraded the line of codes so atleast it's much better to understand and finally was able to rebase and and squash 4 commits into 1 and made the whole thing better.
Top comments (0)