Uploading and Managing Files

Learn how to add, organize, and edit files in your GitHub repository.

Manual File Upload

Once your repository is created, you can start adding files. GitHub makes it easy to upload files directly from your computer without needing Git installed. Here’s how to upload them manually:

  1. Open your repository on GitHub.
  2. Click the Add file button and select Upload files.
GitHub repository page showing Add file menu with Upload files option
The repository page includes an Add file menu where you can select Upload files.
  1. Drag and drop files from your computer, or click to browse and select them.
  2. Scroll down and add a commit message (e.g., “Initial upload”).
  3. Click Commit changes to save the files to your repository.

Editing Files Online

GitHub lets you edit files directly in your browser, which is useful for quick changes. Here’s how:

  1. Click on the file you want to edit.
  2. Click the pencil icon in the top-right corner.
GitHub file view with pencil icon for editing
Each file page includes a pencil icon that opens the browser editor for quick changes.
  1. Make your changes in the editor.
  2. Scroll down and write a commit message describing your update.
  3. Click Commit changes to save.

Additonally, you can delete a file here too.

  1. Click on the 3 dots.
  2. On the drop-down menu, click on delete.
  3. Commit Changes.
GitHub browser editor with commit message field
The file editor delete files and save changes.

For larger edits or coding projects, you’ll eventually want to use Git locally or GitHub Codespaces, but the browser editor is perfect for small fixes.

Tips for Managing Files

Continue to GitHub Codespaces

Now that your files are in place, you’re ready to explore GitHub Codespaces for cloud-based development. Visit the GitHub Codespaces page to continue. There, you’ll learn how to edit and run code directly in the cloud without needing to install tools locally.