Today I learned how to use remote branches in git. I practiced this git feature by having a peer work on my txt-to-HTML-converter. They added in the option for TOML file support, which would allow the user of my program to bypass having to enter in a list of optional arguments by just putting them in the TOML file. I also did the same by working on a peer's Text2Page program, which is where I learned how to use the TOMLLIB Python Library. I'll first start off by talking about what it was like implementing the feature in my peer's repo, then I'll move out to what it was like creating a remote branch for my other peer's addition to my program and merging their code into mine.
Implementing TOML Support to Text2Page
Working on the code implementation was very simple, and python has a couple TOML libraries to choose from. However, TOMLLIB is built right in to newer versions of Python. So I decided to go with that, so this way my peer and other users wouldn't have to download a library to get the program to work. The examples that TOMLLIB provided were also very straight forward. Although, I did have to look up how I can directly access the values of the TOML file so I can assign it's value to a variable. But after I found out how to do it, it was smooth sailing from there on out. After I implemented the feature, I ran a couple tests just to give myself a better idea of both how the TOML file extension and the TOMLLIB library work. I then made my commits to my fork of the repo and pushed it so I could make a pull request.
Using Remote Branch to Merge a Peer's work onto my Repo
When my other peer was done working on their implementation of TOML support to my program, I used a remote branch to test their work out. The process to make a remote branch was pretty simple, I was kind of confused of it's purpose at first, but after I got to try it out and after my professor for clarification I had a better understanding of it. Compared to previous pull requests where I just looked at each line of code that was changed and made sure it was done correctly. Remote branches gave me the ability to clone my peer's work without having to download it to my computer so I can test it out, and then go back to github and merging it, then pulling the merge into my clone of my repo. Remote branches allowed me to do it all in one place, which was much more efficient. I had no problems using remote branches, so I'm looking forward to using it in the future.
Conclusion
While this was a shorter post, I still learned a decent amount, I learned about the TOML file extension, TOMLLIB library, as well as remote branches. I'm interested in seeing how I can use the TOML extension in other projects I may work on the future, with other languages, and how I can use remote branches with collabs in the future. Thanks for reading! Hope everyone enjoys their weekend and that the Canadians reading this have a good Thanksgiving!
Top comments (0)