Getting Files to GitHub

A step-by-step guide using Git + GitHub CLI on Fedora

⚙ Fedora / KDE Plasma ❯ GitHub CLI ■ Terminal
Progress
0 / 9

One-Time Setup

1
Install Git and GitHub CLI

Open Konsole (or any terminal) and run these two commands. Git is the version control engine; gh is GitHub's official CLI tool that sits on top of it.

terminal
$ sudo dnf install git
terminal
$ sudo dnf install gh
If either is already installed, dnf will just say "nothing to do." No harm done.
2
Tell Git who you are

Git stamps every commit with your name and email. These should match your GitHub account. This only needs to be done once per machine.

terminal
$ git config --global user.name "Your Name" $ git config --global user.email "you@example.com"
Replace the quoted values with your actual name and the email tied to your GitHub account.
3
Authenticate with GitHub

This is where gh really shines — it handles all the authentication plumbing for you. Run this and follow the interactive prompts:

terminal
$ gh auth login

It will ask you a few things:

prompts you'll see
? What account do you want to log into? → GitHub.com ? What is your preferred protocol? → HTTPS ? Authenticate Git with your GitHub credentials? → Yes ? How would you like to authenticate? → Login with a web browser

It will give you a one-time code, then open your browser. Paste the code, authorize the app, and you're done. This also configures regular git push to work without extra password prompts.

You can verify it worked by running: gh auth status
4
Clone your existing repo

This downloads your GitHub repo to a local folder. Navigate to wherever you want to keep your projects first (like ~/Projects), then clone:

terminal
$ cd ~/Projects $ gh repo clone your-username/your-repo-name

This creates a folder with your repo's name containing all of your existing files. Move into it:

terminal
$ cd your-repo-name
You can find the exact clone path on your repo's GitHub page — the green <> Code button shows it. But with gh, just the username/repo format works.

Adding Your Files Today

5
Copy your files into the repo folder

Use your file manager (Dolphin) or the terminal to copy your new files into the cloned repo folder. You can also overwrite existing files if you're updating them — Git will detect the changes automatically.

terminal — examples
# Copy a single file $ cp ~/Downloads/my-new-game.html . # Copy several files at once $ cp ~/Downloads/file1.html ~/Downloads/file2.html . # Copy everything from a folder $ cp ~/Downloads/my-batch/* .
Make sure you're inside the repo folder when you do this. The . at the end means "right here."
6
Check what Git sees

Before committing, take a look at what Git has detected. This is your safety check — get in the habit of running this often:

terminal
$ git status

You'll see output like this:

example output
Untracked files: my-new-game.html another-file.html Modified: existing-file.html

Untracked = brand new files Git hasn't seen before. Modified = existing files you've updated. Both are expected.

7
Stage and commit

Staging means telling Git "include these changes in my next commit." Committing creates a snapshot with a message describing what you did.

terminal
# Stage everything (new + modified) $ git add . # Commit with a message $ git commit -m "Add new game files and update index"

Or, to stage and commit specific files instead of everything:

terminal — selective
$ git add my-new-game.html another-file.html $ git commit -m "Add two new game projects"
Write commit messages that describe what changed, not that something changed. "Add Missile Command remake" beats "update files."
8
Push to GitHub

Your commit currently exists only on your machine. Push sends it up to GitHub so it's live in your repo:

terminal
$ git push

That's it. Go check your repo on GitHub — your new and updated files should be there. Since gh auth login already set up your credentials, no password prompt should appear.

You can quickly open your repo in the browser with: gh browse

Your Daily Workflow

9
The daily 4-command loop

Once the setup is done, adding 1–5 files per day is just this loop every time:

daily workflow
# 1. Go to your repo $ cd ~/Projects/your-repo-name # 2. Copy in your new/updated files $ cp ~/path/to/new-files/* . # 3. Stage, commit, push $ git add . $ git commit -m "Add today's project files" $ git push
You can make multiple commits per day. Smaller, focused commits with clear messages are better than one giant dump at the end of the day.
If you ever edit files directly on GitHub's website, run git pull before starting local work to sync those changes down first. Otherwise you'll get merge conflicts.
⚡ Quick Reference
git status
See what's changed / staged
git add .
Stage all changes
git commit -m "msg"
Save a snapshot locally
git push
Upload commits to GitHub
git pull
Download latest from GitHub
git log --oneline
See commit history
git diff
See unstaged changes in detail
gh browse
Open repo in browser
gh auth status
Check login state
gh repo view
Repo info in terminal