{"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-08-31T19:57:19","modified_gmt":"2026-08-31T19:57:19","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 class=\"wp-block-paragraph\">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 class=\"wp-block-paragraph\">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 class=\"wp-block-paragraph\">When an assignment is ready, your instructor gives you access to your own private copy of it \u2014 see &#8220;Getting Access to Your Assignments&#8221; on Getting Started with GitHub if you haven&#8217;t read that yet. You&#8217;ll get an email and\/or a GitHub notification (bell icon, top-right of github.com); open it and click Accept invitation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That&#8217;s the whole step \u2014 no Terminal, no commands to run. Once accepted, the repo shows up under github.com \u2192 your profile icon \u2192 Your repositories, and you&#8217;re ready to clone it below.<\/p>\n\n\n\n<h2 id=\"cloning-to-mac\" class=\"wp-block-heading\">2. Cloning the Repo to Your Mac<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">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 &gt; Clone Repository<\/li>\n\n\n\n<li>In the modal dialog, select GitHub.com and select the assignment repository you just accepted. (Click the Refresh icon if you don&#8217;t see it yet.)<\/li>\n\n\n\n<li>Select a folder on your Mac in the Local Path picker toward the bottom of the modal \u2014 anywhere works, but it&#8217;s worth keeping all your assignment repos together in one place, e.g.&nbsp;<code>~\/Documents\/NMIX4030<\/code>.<\/li>\n\n\n\n<li>In the Clone As\u2026 field, be sure to use the provided name for the destination folder, for example, project-one-uga12345<\/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 class=\"wp-block-paragraph\">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 class=\"wp-block-paragraph\">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 class=\"wp-block-paragraph\">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 class=\"wp-block-paragraph\">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 class=\"wp-block-paragraph\">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 (Submitting)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">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 class=\"wp-block-paragraph\">Click <strong>Push origin<\/strong>. Your commits are now on GitHub and visible to your instructor \u2014 this is your submission. There&#8217;s no separate &#8220;submit&#8221; button or step; whatever is pushed to main when the assignment is due is what gets graded, so push often rather than only once at the end.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">6. Checking Your Submission<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Not sure if your push actually went through? Two ways to check:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>In GitHub Desktop:<\/strong> go to Repository \u2192 View on GitHub. This opens your exact repo directly in the browser \u2014 no need to type or remember any URL. Look at the file list and the timestamp on the latest commit; if what you expect to see is there and recent, you&#8217;re good.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>From github.com directly:<\/strong> click your profile icon (top right) \u2192 Your repositories. Every assignment repo you have access to shows up there automatically.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If a repo looks empty or out of date, that almost always means you committed but forgot to push \u2014 go back to GitHub Desktop and click Push origin.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">7. Troubleshooting<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Rolling Back to a Previous Commit<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">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 class=\"wp-block-paragraph\">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 class=\"wp-block-paragraph\">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 class=\"wp-block-paragraph\">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 When an assignment is ready, your instructor gives you access to your own private copy of it &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":7,"href":"https:\/\/nmi.cool\/appdev\/wp-json\/wp\/v2\/pages\/4226\/revisions"}],"predecessor-version":[{"id":4342,"href":"https:\/\/nmi.cool\/appdev\/wp-json\/wp\/v2\/pages\/4226\/revisions\/4342"}],"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}]}}