The No-Terminal Method: Uploading Code Directly via the GitHub Web Interface
If you aren't ready to dive into the command line or don't want to deal with installing Git, GitHub provides a straightforward way to upload your files directly through your browser. This is perfect for smaller projects, documentation, or quick backups.
Here is how to get your code onto GitHub using only your mouse and browser.
Upload Your Files 🗂️
Once you have selected the folder of the task you have completed
- On your main repository page, look for the Add file button (located near the top right of the file list).
- Select Upload files from the dropdown menu.
- You will see a "Drag and drop" area. You can:
- Drag your project folder or individual files directly into the browser window.
- Click choose your files to browse your computer manually.
Note: The web interface has a limit of 100 files per upload. If your project is larger (like a massive React app with thousands of dependencies), the command line is a better fit.
Commit the Upload ✅
In the world of version control, "committing" is essentially hitting the save button.
- Scroll down to the Commit changes box at the bottom of the page.
- In the first box, write a short, descriptive summary of what you uploaded (e.g., "Initial upload of project files").
- Ensure the radio button for Commit directly to the main branch is selected.
- Click the green Commit changes button.
Managing Your Files Online 🗄️
Once your code is uploaded, you can manage it directly in the browser:
- Editing: Click on any text file (like an .html or .js file) and click the pencil icon to make quick edits.
- Deleting: Click a file, then click the three dots (...) menu followed by Delete file.
- Creating New Files: Use the Add file > Create new file option to write code directly in the GitHub editor.