Week 7 - Learning Git and Final Projects
One of my goals for this class is to learn more about Git version control. Although I know Git basics (e.g. add, commits, pull requests), I don’t understand why they worked the way they did and why I always got weird
<<<< HEAD comments on my files when a merge conflict arises. This week, our lecture was dedicated to helping us understand git version control, enough to prepare us for our final project contributions.
To help us understand Git, Professor Klukowska used Visualizing Git-a visual tool that simulates git commands. When I was learning git, I found that reading about it was unhelpful because I was unable to differentiate commands. But with the simulator, I was able to see how commits build off of different branches. Moreover, I learned the importance of creating different branches when implementing new features. I had a habit of adding changes and committing to the master branch instead of separating into different branches and merging in the end. Now that I know how to create new branches and commit directly to them, I will do so in future contributions. We also learned about the key differences between rebase and merge. I’ve never heard of rebase before and learned that it’s often confused with merge. Although rebase and merge serve the same function, rebase “resets” the commit history whereas merge preserves it. Therefore, using merge is more advantageous in that if anything goes wrong, you’re able to go back to a working version of your code. With this workshop, I feel more confident in making open source contributions for our final project.