Skip to content
Elsa Culler edited this page Sep 17, 2024 · 3 revisions

Get help!

Ask technical questions on the discussion board

This is the fastest way to get help in this class! But, it only works if you give others enough information to help. Here's how:

  1. Start a new Q&A discussion
  2. Write a detailed description of your problem. You should include:
    • What you were trying to do / what you expected to happen
    • What you did
    • What actually happened
    • Details about your set up -- important details can include the platform, operating system, software and library versions
  3. Support your description with FULL error messages, minimal reproducible code examples, and/or screenshots.
  4. Tag anyone you would like to look at your question using @username syntax.

Save and submit your work

You can save work to GitHub by 1) committing and 2) pushing/syncing your work to GitHub. It's a good practice to do this every time you do a chunk of work, in order to take the best advantage of version control -- but you will definitely need to do it to submit progress GitHub Classroom assignments!

From a RUNNING GitHub Codespace

Demo video

  1. Navigate to the Source Control tab on the left

    image

  2. Write a note in the box that says 'Message'

  3. Click Commit

  4. Click Sync

  5. You should now see your changes reflected in your repository on GitHub (NOT just in the Codespace!)

NOTE: If you have changes pushed to your remote repository (this is what you see when you open up your repository on GitHub), you may need to first select ... > Pull > Pull (Rebase). This is the most common problem we see for folks who are trying to Sync from Codespaces, and it's a tricky one -- some folks have run into small changes they didn't make, possibly from GitHub Classroom or maybe the process of opening a Codespace itself.

From a STOPPED GitHub Codespace

Open up your Codespace again and commit/sync using the instructions above. Your work should still be there as long as the Codespace has not been deleted!

From your computer using GitHub Desktop

Video coming soon!

  1. Open GitHub Desktop, and select the repository you want to sync.
  2. Write a message for your commit.
  3. Click Commit.
  4. Click Push.

NOTE that you may need to pull changes down from GitHub before pushing! GitHub desktop has a graphic user interface for merging any conflicts, but try not to make changes to the same file in different locations to avoid gnarly conflicts.

From your computer using the command line

Video coming soon!

The command line git tools are very powerful, but the process can get a little spicy! If you're new to git, you might want to make a backup copy of your work before messing around with git on the command line.

  1. Open a terminal and navigate to your GitHub repository
  2. Run git status and follow the suggested commands if any. Make sure that no files you don't want to track (like .ipynb_checkpoints folders) are included in the listed changes. If they are you can add them to the .gitignore file.
  3. Run git add ., or replace the . with individual files you want to track. This tells git to pay attention to changes in the specified files.
  4. Check git status again to make sure that you really want all the changes that are Staged to commit.
  5. Run git commit -m "some message here", replacing some message herewith your commit message. If you forget and get stuck in vim (you'll know because you'll see an empty file and typing will do weird stuff, or nothing), then go ahead and typeESC q ! ENTER` to cancel. Then, re-run your command making sure to include a message!
  6. Check git status again to make sure your commit went through.
  7. Run git push. If it doesn't work, check the suggested commands in the output -- they're usually right about the next step!

NOTE that you always want to carefully read the outputs of any git command, and it's usually a good idea to follow any instructions there. Don't assume that your commands completed successfully because you see the command line prompt again -- that's not how the command line informs you of errors and warnings!