{"id":4226,"date":"2026-04-08T18:55:34","date_gmt":"2026-04-08T18:55:34","guid":{"rendered":"https:\/\/nmi.cool\/native-app\/working-with-github\/"},"modified":"2026-04-23T21:20:47","modified_gmt":"2026-04-23T21:20:47","slug":"working-with-github","status":"publish","type":"page","link":"https:\/\/nmi.cool\/appdev\/working-with-github\/","title":{"rendered":"Working with GitHub"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">The Workflow We&#8217;re Using<\/h2>\n\n\n\n<p>In this course, you&#8217;ll use a focused Git workflow: <\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Accept an assignment via GitHub Classroom<\/li>\n\n\n\n<li>Clone the repo to your Mac<\/li>\n\n\n\n<li>Add your existing project files (if necessary)<\/li>\n\n\n\n<li>Commit your changes as you work<\/li>\n\n\n\n<li>Push to GitHub<\/li>\n<\/ol>\n\n\n\n<p>This page will walk you through this workflow, along with a couple troubleshooting steps you might find useful.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1. Accepting an Assignment via GitHub Classroom<\/h2>\n\n\n\n<p>After <a href=\"https:\/\/nmi.cool\/appdev\/getting-started-with-github\/\" data-type=\"page\" data-id=\"4225\">Getting Started with GitHub<\/a>, when your instructor shares an assignment invite link, open it in your browser and click <strong>Accept this assignment<\/strong>. GitHub Classroom will create a personal copy of the starter repo under your GitHub account \u2014 this takes a few seconds.<\/p>\n\n\n\n<p>After accepting, you can find your new repo by going to <strong>github.com \u2192 your profile icon \u2192 Your organizations \u2192 Your GitHub Classroom name (example: 2026-spring-nmix-4030-weatherford-1135<\/strong>). You&#8217;ll also receive a notification in GitHub linking directly to it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"cloning-to-mac\">2. Cloning the Repo to Your Mac<\/h2>\n\n\n\n<p>Cloning a repository creates a linked local copy of the assignment on your Mac. Any commits you make locally can then be pushed back up to GitHub.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>In GitHub Desktop, go to File > Clone Repository<\/li>\n\n\n\n<li>In the modal dialog, select GitHub.com and select the assignment repository. (Click the Refresh icon.<\/li>\n\n\n\n<li>Select your class OneDrive folder in the Local Path picker toward the bottom of the modal.<\/li>\n\n\n\n<li>In the Clone As&#8230; field, be sure to use the provided name for the destination folder, for example, <code>project-one-uga12345<\/code><\/li>\n\n\n\n<li>Click Clone.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"677\" src=\"https:\/\/nmi.cool\/appdev\/wp-content\/uploads\/sites\/17\/2026\/04\/Screenshot-2026-04-08-at-4.42.43-PM-1024x677.png\" alt=\"GitHub Desktop's Clone a Repository modal showing a GitHub Classroom assignment being cloned from GitHub.com to a user's local OneDrive folder.\" class=\"wp-image-4237\" srcset=\"https:\/\/nmi.cool\/appdev\/wp-content\/uploads\/sites\/17\/2026\/04\/Screenshot-2026-04-08-at-4.42.43-PM-1024x677.png 1024w, https:\/\/nmi.cool\/appdev\/wp-content\/uploads\/sites\/17\/2026\/04\/Screenshot-2026-04-08-at-4.42.43-PM-300x198.png 300w, https:\/\/nmi.cool\/appdev\/wp-content\/uploads\/sites\/17\/2026\/04\/Screenshot-2026-04-08-at-4.42.43-PM-768x508.png 768w, https:\/\/nmi.cool\/appdev\/wp-content\/uploads\/sites\/17\/2026\/04\/Screenshot-2026-04-08-at-4.42.43-PM-1536x1015.png 1536w, https:\/\/nmi.cool\/appdev\/wp-content\/uploads\/sites\/17\/2026\/04\/Screenshot-2026-04-08-at-4.42.43-PM-2048x1354.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">3. Adding Existing Project Files (if necessary)<\/h2>\n\n\n\n<p>After cloning, you may need to add local files to your repository. To do so:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>In GitHub Desktop, go to <strong>Repository \u2192 Show in Finder<\/strong> to open the folder<\/li>\n\n\n\n<li>Copy or move the contents of your Xcode project folder into the repo folder<\/li>\n<\/ol>\n\n\n\n<p>GitHub Desktop will immediately detect the new files and show them in the <strong>Changes<\/strong> tab. Green <strong>+<\/strong> icons indicate new files; yellow dots indicate modified files; red <strong>\u2212<\/strong> icons indicate deleted files.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">4. Making a Commit<\/h2>\n\n\n\n<p>A <strong>commit<\/strong> is a snapshot of your project saved to your local repo. It does <em>not<\/em> go to GitHub yet \u2014 commits are local until you push them.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/docs.github.com\/assets\/cb-16555\/images\/help\/desktop\/commit-all.png\" alt=\"GitHub Desktop Changes tab showing 3 changed files with checkboxes and file status icons\"\/><\/figure>\n\n\n\n<p>In the <strong>Changes<\/strong> tab, make sure all files you want to include are checked. Then write a clear commit message in the <strong>Summary<\/strong> field. A good commit message is brief but descriptive \u2014 it answers <em>what changed and why<\/em>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u2705 <code>Add initial Xcode project files<\/code><\/li>\n\n\n\n<li>\u2705 <code>Fix layout constraints in Main.storyboard<\/code><\/li>\n\n\n\n<li>\u274c <code>stuff<\/code><\/li>\n\n\n\n<li>\u274c <code>final final FINAL<\/code><\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/docs.github.com\/assets\/cb-22918\/images\/help\/desktop\/create-commit-details.png\" alt=\"GitHub Desktop Changes tab showing the Summary commit message field and Commit to main button\" style=\"width:auto;height:400px\"\/><\/figure>\n\n\n\n<p>Click <strong>Commit to main<\/strong>. The changes are now saved locally. You can make as many commits as you like before pushing \u2014 think of them as checkpoints.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">5. Pushing to Origin<\/h2>\n\n\n\n<p>Pushing sends your local commits up to GitHub. After committing, a <strong>Push origin<\/strong> button appears in the toolbar with a count of commits ready to upload.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/docs.github.com\/assets\/cb-17787\/images\/help\/desktop\/push-to-origin.png\" alt=\"GitHub Desktop toolbar showing Push origin button with commit count indicator\"\/><\/figure>\n\n\n\n<p>Click <strong>Push origin<\/strong>. Your commits are now on GitHub and visible to your instructor.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Rolling Back to a Previous Commit<\/h3>\n\n\n\n<p>If you introduce a bug or want to undo recent work, you can revert a commit. Switch to the <strong>History<\/strong> tab to see your full commit log.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/docs.github.com\/assets\/cb-130280\/images\/help\/desktop\/history-tab-in-commit-sidebar.png\" alt=\"GitHub Desktop History tab showing a list of past commits with author and timestamp\"\/><\/figure>\n\n\n\n<p>Right-click the commit you want to undo and choose <strong>Revert Changes in Commit<\/strong>. This creates a new commit that reverses the selected one \u2014 your history stays intact, which is important if you&#8217;ve already pushed.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/docs.github.com\/assets\/cb-146978\/images\/help\/desktop\/commit-revert-mac.png\" alt=\"GitHub Desktop History tab with right-click context menu showing Revert Changes in Commit option highlighted\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Deleting a Local Repo and Re-cloning<\/h3>\n\n\n\n<p>If your local repo gets into a bad state, or you need to move to a different computer, you can always delete the local copy and re-clone from GitHub \u2014 all commits you pushed to GitHub are safe.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>In GitHub Desktop, right-click the repo name in the left sidebar and choose <strong>Remove<\/strong> \u2014 this removes it from GitHub Desktop only, it does not delete your files yet<\/li>\n\n\n\n<li>In Finder, locate the repo folder and move it to the Trash<\/li>\n\n\n\n<li>Repeat <a href=\"#cloning-to-mac\" data-type=\"internal\" data-id=\"#cloning-to-mac\">2. Cloning the Repo to Your Mac<\/a> to create a new local copy.<\/li>\n<\/ol>\n\n\n\n<p>Your repo on GitHub is untouched. Re-cloning gives you a clean local copy with the full commit history.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Workflow We&#8217;re Using In this course, you&#8217;ll use a focused Git workflow: This page will walk you through this workflow, along with a couple troubleshooting steps you might find useful. 1. Accepting an Assignment via GitHub Classroom After Getting Started with GitHub, when your instructor shares an assignment invite link, open it in your &hellip; <a href=\"https:\/\/nmi.cool\/appdev\/working-with-github\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Working with GitHub<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-4226","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/nmi.cool\/appdev\/wp-json\/wp\/v2\/pages\/4226","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nmi.cool\/appdev\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/nmi.cool\/appdev\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/nmi.cool\/appdev\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nmi.cool\/appdev\/wp-json\/wp\/v2\/comments?post=4226"}],"version-history":[{"count":4,"href":"https:\/\/nmi.cool\/appdev\/wp-json\/wp\/v2\/pages\/4226\/revisions"}],"predecessor-version":[{"id":4262,"href":"https:\/\/nmi.cool\/appdev\/wp-json\/wp\/v2\/pages\/4226\/revisions\/4262"}],"wp:attachment":[{"href":"https:\/\/nmi.cool\/appdev\/wp-json\/wp\/v2\/media?parent=4226"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}