Link Search Menu Expand Document

Uploading Files in GitHub

Steps to upload files to GitHub (web UI)

  1. Click Add file → Upload files

    upload_file_button

  2. Drag and drop your file(s), then click Commit changes when you are done.

    drag_file_and_commit_changes

Submit your work using Git (command-line)

If you prefer using the command line (your local machine or a Codespace), you can submit your work with these standard Git commands. The examples below assume you have the repository locally or are working inside the Codespace for that repository.

  1. First-time setup (one-time):
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
  1. Add the files you changed or new files:
git add .
  1. Commit your changes with a clear message that includes the HOS number and your name. Example:
git commit -m "HOS 12345 - Your Name"
  1. Push your changes to GitHub (no pull request required unless your instructor asks for one):
git push

Tips and checks:

  • Use git status to see unstaged and staged changes.
  • Use git remote -v to verify the remote repository URL.
  • If you run into authentication issues, ensure your SSH key or personal access token is configured for GitHub.

Submit your work using GitHub Desktop (GUI)

You can also use GitHub Desktop, a graphical application that simplifies committing and pushing changes.

  1. Open GitHub Desktop and File → Clone repository… to clone the repo, or click Open in GitHub Desktop from the repository page on GitHub to open the repository directly.

  2. Make your edits locally (in your editor). In GitHub Desktop you’ll see changed files listed in the left pane.

  3. Enter a short Summary for the commit that includes the HOS number and your name (for example: HOS 12345 - Your Name), and an optional description. github-desktop-commit

  4. Click Push origin (top toolbar) to upload your commit to GitHub. No Pull Request is required unless your instructor specifies otherwise. github-desktop-push

After pushing, the commit message containing your HOS number and name will appear in the repository history — that serves as your submission. If your instructor also asks you to leave a comment somewhere (for example on the assignment page), add that separately following course instructions.

Tips:

  • Use the Repository menu to open the repository in your file manager or your code editor.
  • If GitHub Desktop asks you to sign in, follow the authentication steps shown in the app.

^
TOP

Copyright @ 2025 CityU STC