{"id":53,"date":"2025-02-07T07:55:17","date_gmt":"2025-02-07T07:55:17","guid":{"rendered":"https:\/\/blogs.oregonstate.edu\/hornbuckle\/?p=53"},"modified":"2025-02-07T07:55:17","modified_gmt":"2025-02-07T07:55:17","slug":"navigating-githubs-love-hate-rollercoaster","status":"publish","type":"post","link":"https:\/\/blogs.oregonstate.edu\/hornbuckle\/2025\/02\/07\/navigating-githubs-love-hate-rollercoaster\/","title":{"rendered":"Navigating GitHub\u2019s Love-Hate Rollercoaster"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"994\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/IMG_0835-1024x994.jpg\" alt=\"\" class=\"wp-image-54\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/IMG_0835-1024x994.jpg 1024w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/IMG_0835-300x291.jpg 300w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/IMG_0835-768x746.jpg 768w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/IMG_0835-1536x1491.jpg 1536w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/IMG_0835-1200x1165.jpg 1200w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/IMG_0835-1980x1922.jpg 1980w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/IMG_0835.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>On a cold and bitter February afternoon, a computer programmer&#8217;s worst nightmare ensued: all git commands stopped functioning.<\/p>\n\n\n\n<p>I unleashed my best freak-out face: &gt;:0<\/p>\n\n\n\n<p>Time was running out while I tried to figure out how to fix it. For my senior capstone, my teammates and I are creating a web-based game using Phaser 3&#8217;s framework to create an educational experience on how to fight wildfires. But I needed to push last-minute updates to the game&#8217;s codebase. And Git was not cooperating.<\/p>\n\n\n\n<p>At the time, I used <a href=\"https:\/\/www.jetbrains.com\/webstorm\/\">WebStorm<\/a>, a Javascript and Typescript IDE, to edit the code, which comes with a lot of bells and whistles, including <a href=\"https:\/\/www.jetbrains.com\/help\/webstorm\/github.html\">built-in Git functionality<\/a>. But one day, these tools stopped working. So I switched to using the built-in terminal, but no matter how many branches or clones I made, I was blocked at every turn.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">An Unpopular Opinion to Navigate<\/h2>\n\n\n\n<p>To make matters worse, GitHub and I have a horrible relationship. It&#8217;s embarrassing! I avoided learning git commands for years. Ever since my first computer science course, everyone always told me how amazing using GitHub was, whether they were decades-long professionals or first-year college students. What a bunch of bologna!<br><br>Eh. The user interface on GitHub&#8217;s website was difficult for me to navigate, and for the longest time, I didn&#8217;t realize that manually downloading and uploading updated code to GitHub wasn&#8217;t &#8216;normal.&#8217; Or at least, not the best way to use it. And I didn&#8217;t understand what the terminology meant. It felt I was being told to &#8216;branch&#8217; and &#8216;fork&#8217; when I didn&#8217;t want to. Magic forks are weird! And magic branches feel like &#8216;Alice in Wonderland,&#8217; and that story always made me feel uncomfortable (the cat freaked me out, and I&#8217;m a huge cat person, so that was disturbing). Worse, I didn&#8217;t understand what happened after calling those commands in the terminal. <\/p>\n\n\n\n<p>But there&#8217;s no way I&#8217;m the only computer programmer in the world experiencing these issues!<\/p>\n\n\n\n<p>This is why I want to show you what I appreciate about GitHub now, and a new technology I&#8217;m using that helped me understand GitHub at a deeper level, and makes navigating the steps more fun.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Basic Commands<\/h2>\n\n\n\n<p>Based on my understanding thus far, which is very limited, this is the most simple workflow to use when making changes to a GitHub repository.<\/p>\n\n\n<p>git clone     # make a copy of the repository<br \/>\ngit branch         # create a new place to store a copy<br \/>\ngit checkout       # enter that copy<br \/>\ngit pull origin main            # merge latest code to branch<\/p>\n<p>&#8230;make code edits&#8230;<\/p>\n<p>git add &#8211;all                     # put changes in a queue (staging)<br \/>\ngit commit -m &#8220;what you changed&#8221;  # attach a message to changes<br \/>\ngit push origin      # upload code changes to main<\/p>\n\n\n\n<p>These are commands that have helped me the most in navigating the crazy web of Git. But given that it&#8217;s easy to make mistakes and get lost, <a href=\"https:\/\/docs.github.com\/en\/get-started\/using-git\/about-git\">GitHub&#8217;s documentation<\/a> is a good starting place, and more understandable after already learning the commands I talked about above.<\/p>\n\n\n\n<p>What I appreciate now about GitHub is that once you understand how a few different steps work, I feel like I&#8217;m more in control with how to update different versions of code. I guess since it&#8217;s &#8216;version control,&#8217; that&#8217;s appropriate.<\/p>\n\n\n\n<p>But it did take me a while to get to that point. And although using tools with bells and whistles is convenient, sometimes they obfuscate the process. So when something breaks, it&#8217;s really hard to know what went wrong. More confusion leads to more frustration, and it can surprisingly waste a lot of time.<\/p>\n\n\n\n<p>I ended up finding a technology that technically still has downloadable bells and whistles, but they do make managing versions not only easier to understand, but <em>demonstrate the process<\/em>, and make it clear which steps need to occur in order. Surprisingly, it was with a very common free IDE.<\/p>\n\n\n\n<p>I&#8217;ll explain.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">A Visual Solution<\/h2>\n\n\n\n<p>I downloaded <a href=\"https:\/\/code.visualstudio.com\/\">Visual Studio Code<\/a> and downloaded the following extensions:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=GitHub.vscode-pull-request-github\">GitHub Pull Requests by GitHub<\/a><br>Why? To review and manage GitHub Pull Requests! This is very useful when working on a team repository.<\/li>\n\n\n\n<li><a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=GitHub.remotehub\">GitHub Repositories by GitHub<\/a><br>Why? To quickly browse, search, edit, and commit to any remote GitHub repository from inside the IDE!<\/li>\n\n\n\n<li><a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-vscode.azure-repos\">Azure Repose By Microsoft<\/a><br>Why? To open and browse repos quickly from any version. Cloning without this can result in working with out-of-date code, especially if the main repository is regularly updated often.<\/li>\n\n\n\n<li><a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-vscode.remote-repositories\">Remote Repositories by Microsoft<\/a><br>Why? This one integrates with the GitHub Repositories and Azure Repos extensions. Disabling this extension makes all these extensions (except GitHub Pull Requests) inactive, so I believe it&#8217;s to tie them together.<\/li>\n<\/ul>\n\n\n\n<p>Let&#8217;s explore how all these extensions function together. First, I clicked on the <strong>Remote Explorer<\/strong> button that looks like a desktop icon in the IDE. Then I clicked the <strong>+ <\/strong>sign to add a new remote repository.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"824\" height=\"714\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-06-at-11.33.57-PM.png\" alt=\"\" class=\"wp-image-56\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-06-at-11.33.57-PM.png 824w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-06-at-11.33.57-PM-300x260.png 300w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-06-at-11.33.57-PM-768x665.png 768w\" sizes=\"auto, (max-width: 824px) 100vw, 824px\" \/><\/figure>\n\n\n\n<p>Which opened up a beautiful window at the top of the window that let me sign into GitHub and open a repository! My team&#8217;s is named <strong>fire-sim<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"391\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-06-at-11.32.03-PM-1024x391.png\" alt=\"\" class=\"wp-image-57\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-06-at-11.32.03-PM-1024x391.png 1024w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-06-at-11.32.03-PM-300x114.png 300w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-06-at-11.32.03-PM-768x293.png 768w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-06-at-11.32.03-PM-1200x458.png 1200w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-06-at-11.32.03-PM.png 1237w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Notice that there are options to open pull requests too! These are extremely helpful to look at all the revisions. In my opinion, it feels clunky to use GitHub&#8217;s default UI. <br><br>Here is an example of what editing a pull request might look like with these extensions in Visual Studio Code. Note the extra &#8216;pull request icon&#8217; at the bottom of the left sidebar, and how easy it is to see the old code vs. the new changes being requested to merge into main:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-03-at-5.13.55-PM-1024x640.png\" alt=\"\" class=\"wp-image-59\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-03-at-5.13.55-PM-1024x640.png 1024w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-03-at-5.13.55-PM-300x188.png 300w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-03-at-5.13.55-PM-768x480.png 768w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-03-at-5.13.55-PM-1536x960.png 1536w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-03-at-5.13.55-PM-2048x1280.png 2048w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-03-at-5.13.55-PM-1200x750.png 1200w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-03-at-5.13.55-PM-1980x1238.png 1980w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>But that&#8217;s a side point. The biggest feature I want to demonstrate is how to make a new branch after adding a remote repository.<\/p>\n\n\n\n<p>So, when you first open a repository, the codebase opens up. However, in order to make changes on a new branch and make a pull request later, an extra step is required.<\/p>\n\n\n\n<p>I clicked on the &#8216;bug&#8217; icon on the left side of the sidebar. This is normally the &#8216;Run and Debug&#8217; button. Then, I clicked <strong>Continue Working On<\/strong>&#8230;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"831\" height=\"692\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-06-at-11.45.37-PM.png\" alt=\"\" class=\"wp-image-60\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-06-at-11.45.37-PM.png 831w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-06-at-11.45.37-PM-300x250.png 300w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-06-at-11.45.37-PM-768x640.png 768w\" sizes=\"auto, (max-width: 831px) 100vw, 831px\" \/><\/figure>\n\n\n\n<p>This allowed me to choose a new option that says, &#8220;<strong>Clone Repository Locally and Open on Desktop<\/strong>.&#8221; I get to choose a folder to save the code copy in. This opens up an entire new window, and when I open the terminal, I&#8217;m already navigated to the copy.<\/p>\n\n\n\n<p>And this is the time to run all the code commands I wish! To add a new branch, I run the following commands:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1012\" height=\"215\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-06-at-11.50.11-PM.png\" alt=\"\" class=\"wp-image-61\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-06-at-11.50.11-PM.png 1012w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-06-at-11.50.11-PM-300x64.png 300w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-06-at-11.50.11-PM-768x163.png 768w\" sizes=\"auto, (max-width: 1012px) 100vw, 1012px\" \/><\/figure>\n\n\n\n<p>Now in my IDE, I can make code changes in this beautiful setup.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"648\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-06-at-11.50.56-PM-1024x648.png\" alt=\"\" class=\"wp-image-62\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-06-at-11.50.56-PM-1024x648.png 1024w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-06-at-11.50.56-PM-300x190.png 300w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-06-at-11.50.56-PM-768x486.png 768w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-06-at-11.50.56-PM-1536x972.png 1536w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-06-at-11.50.56-PM-2048x1297.png 2048w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-06-at-11.50.56-PM-1200x760.png 1200w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-06-at-11.50.56-PM-1980x1254.png 1980w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>After saving changes to each code file (eg. Ctrl+S or CMD+S), the IDE automatically detects changes and notifies you to make a commit via the <strong>Source Control<\/strong> button!<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"830\" height=\"886\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-06-at-11.51.30-PM.png\" alt=\"\" class=\"wp-image-63\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-06-at-11.51.30-PM.png 830w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-06-at-11.51.30-PM-281x300.png 281w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8114\/files\/2025\/02\/Screenshot-2025-02-06-at-11.51.30-PM-768x820.png 768w\" sizes=\"auto, (max-width: 830px) 100vw, 830px\" \/><\/figure>\n\n\n\n<p>A new file opens that lets me write a comment, and then once I save (eg. Ctrl+S or CMD+S), and exit that file, I can push the code.<br><br>I can also make a commit and push the code through the terminal if I don&#8217;t like the GUI version. This kind of freedom is exactly what I was looking for, and might be the key to saving my love-hate relationship with GitHub.<br><\/p>\n\n\n\n<p>I hope this article helps any other programmers enjoy version control a little more too!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>On a cold and bitter February afternoon, a computer programmer&#8217;s worst nightmare ensued: all git commands stopped functioning. I unleashed my best freak-out face: &gt;:0 Time was running out while I tried to figure out how to fix it. For my senior capstone, my teammates and I are creating a web-based game using Phaser 3&#8217;s [&hellip;]<\/p>\n","protected":false},"author":14505,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-53","post","type-post","status-publish","format-standard","hentry","category-tips"],"_links":{"self":[{"href":"https:\/\/blogs.oregonstate.edu\/hornbuckle\/wp-json\/wp\/v2\/posts\/53","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.oregonstate.edu\/hornbuckle\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.oregonstate.edu\/hornbuckle\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/hornbuckle\/wp-json\/wp\/v2\/users\/14505"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/hornbuckle\/wp-json\/wp\/v2\/comments?post=53"}],"version-history":[{"count":3,"href":"https:\/\/blogs.oregonstate.edu\/hornbuckle\/wp-json\/wp\/v2\/posts\/53\/revisions"}],"predecessor-version":[{"id":65,"href":"https:\/\/blogs.oregonstate.edu\/hornbuckle\/wp-json\/wp\/v2\/posts\/53\/revisions\/65"}],"wp:attachment":[{"href":"https:\/\/blogs.oregonstate.edu\/hornbuckle\/wp-json\/wp\/v2\/media?parent=53"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/hornbuckle\/wp-json\/wp\/v2\/categories?post=53"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/hornbuckle\/wp-json\/wp\/v2\/tags?post=53"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}