DEV Community


Posted on

Remote Can Troll

This was a big learning week again, what started out looking like a quick assignment ended up a bit of a slog as I worked through all the little things that went wrong.

I started out by getting in touch with Kien to work on his potato generator (great name). It quickly became apparent that this SSG was structured much differently than mine, with lots of different files and functions split up into smaller logical chunks. It took a while to wrap my head around what was going on but he walked me through it and I had something approaching functional last night. I submitted a draft pull request, spent way too long messing around with string parsing as per usual and got it working by the end of the night. I pushed my commit and made my pull request ready for review, and this morning found out it was broken in several ways. Go figure.


In the meantime, Kien had made a pull request of his own which, less excitingly, had nothing wrong with it. I had to get git cli to add his as a remote branch, and getting that working took some doing but with his help I got it running and was ready to merge. What ensued was a whole lot of banging my head against a wall figuring out why the merge wouldn't work, but eventually triumph and a successful merge. Somehow I had changed the URL to my origin to his branch's URL, but setting that back to the correct one solved my problems and the merge was complete.

Back to potato generator, I kept chipping away at it and had it almost ready to go this afternoon when I found I had glossed over the logic for supporting multiple languages in HTML. I didn't realize why he was iterating over the CLI arguments when in my SSG they were always in the same place relative to one another, so I did away with all those loops yesterday only to have to restore them today. After several tests I pushed the changes which he then merged as well.

Overall this was a cool experience, using remotes seems very useful and the concept of upstream/origin branches is making sense to me after this week's efforts. I'm glad I got cli git set up for future labs, and hope my next incursion with it goes smoother.

Top comments (0)