One-Time Setup
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.
Git stamps every commit with your name and email. These should match your GitHub account. This only needs to be done once per machine.
This is where gh really shines — it handles all the authentication plumbing for you. Run this and follow the interactive prompts:
It will ask you a few things:
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.
gh auth status
This downloads your GitHub repo to a local folder. Navigate to wherever you want to keep your projects first (like ~/Projects), then clone:
This creates a folder with your repo's name containing all of your existing files. Move into it:
gh, just the username/repo format works.
Adding Your Files Today
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.
. at the end means "right here."
Before committing, take a look at what Git has detected. This is your safety check — get in the habit of running this often:
You'll see output like this:
Untracked = brand new files Git hasn't seen before. Modified = existing files you've updated. Both are expected.
Staging means telling Git "include these changes in my next commit." Committing creates a snapshot with a message describing what you did.
Or, to stage and commit specific files instead of everything:
Your commit currently exists only on your machine. Push sends it up to GitHub so it's live in your repo:
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.
gh browse
Your Daily Workflow
Once the setup is done, adding 1–5 files per day is just this loop every time:
git pull before starting local work to sync those changes down first. Otherwise you'll get merge conflicts.