In this project, I learned how to work with parallel branches in Git to manage multiple features efficiently, each being separate on its own branch. This was new to me and it enabled me develop, test, and merge different features without interacting with the main branch.
Project Overview
My project repository is available on GitHub here. I created separate issues for each feature to track my work:
- Issue 13 implementing the Line Number Display feature, and
- Issue 14 implementing the File Size Display feature.
Creating and working on topic branches
I created two topic branches for the two features I wanted to implement. These branches were created specifically for working on individual features and were very useful, as any unexpected bugs would remain contained in the topic branches and not affect my main branch.
I made changes in each branch, tested locally to ensure they worked as expected, committed with descriptive messages, and merged them back into main. The fast-forward merge for issue-13 was straightforward, as it was the first merge with the main branch. After the merge, I tested the code again to ensure everything was okay before moving to the next step..
I faced some difficulties merging the issue-14 branch into main. I had a conflict-merge which occurred because this branch modified similar areas of code. I was able to resolve the conflict and successfully merge the branch into
Lesson Learned
For future projects, I will make sure I understand each command beforehand to work more efficiently. Trying to run commands and understand them at the same time was time-consuming.
Working with parallel branches was an excellent way to practice real world Git workflows. I learned a lot about branch management, the merge process, and documentation.
Top comments (0)