home-lab

My homelab documentation and guides

View on GitHub

Setting Up GitHub Documentation for Homelab

Date: March 7, 2026 Environment: Windows 11 Laptop Status: Complete

Objective

Move existing homelab documentation from Google Docs to GitHub and establish a repeatable workflow for committing all future labs to version control.

GitHub Account and Repository Setup

Created a GitHub account at github.com. Then created a new public repository named home-lab with a default README file generated by GitHub.

Installing Git on Windows 11

Downloaded and ran the Git installer. The options selected during setup:

Option Selection
PATH environment Git from the command line and also from 3rd-party software
SSH executable Bundled OpenSSH
HTTPS transport backend OpenSSL
Line ending conversions Checkout Windows-style, commit Unix-style
Terminal emulator MinTTY
Default pull behavior Fast-forward or merge
Credential helper Git Credential Manager
File system caching Enabled
Symbolic links Disabled

After installation, configured Git with a name and email:

git config --global user.name "Your Name"
git config --global user.email "you@example.com"

Cloning the Repository and Adding Files

Cloned the repository to the local machine:

git clone https://github.com/username/home-lab.git C:\Users\user\home-lab

After cloning, replaced the folder contents with the structured lab files by extracting a zip archive into the same directory. This was where the first problem occurred.

Problem: .git Folder Overwritten

What happened: Extracting the zip archive into C:\Users\user\home-lab overwrote the .git folder that git clone had created. Git no longer recognized the directory as a repository.

What was tried: Ran git status and got an error indicating no Git repository was found. Tried navigating into subdirectories, thinking the repository context was a path issue.

What actually fixed it: Re-initialized Git in the directory and re-added the remote origin.

git init
git remote add origin https://github.com/username/home-lab.git

git init creates a fresh .git folder. Adding the remote origin tells Git where to push. The repository connection was restored without touching any of the lab files.

Staging and Committing Files

With the repository restored, staged all files and made the initial commit:

git add .
git commit -m "initial commit"

Problem: Push Failed Due to Branch Name Mismatch

What happened: Running git push -u origin main failed. The error indicated that the remote did not have a branch called main, or more precisely, the local branch was not named main.

What was tried: Assumed the branch name matched GitHub’s default. Tried the push command again without checking the local branch name.

What actually fixed it: Checked the actual local branch name, then pushed to the correct branch.

git branch
git push -u origin master

Git initialized the local repository with master as the default branch. GitHub had created the repository with main as the default. Pushing to master created that branch on the remote and the push succeeded. Authentication was handled by a browser popup via Git Credential Manager.

Problem: GitHub Still Showing Old README

What happened: After a successful push, the GitHub repository page still displayed the original one-line README. The new lab files were not visible.

What was tried: Hard refreshed the page. Checked the repository at a different URL path. Both showed the same old content.

What actually fixed it: GitHub was defaulting to the main branch, which was empty. The files had been pushed to master. Changed the default branch to master in the repository settings under Settings > Branches > Default branch.

After saving that change, the repository page immediately showed the full lab file structure.

Quick Reference

Task Command
Initialize a repository git init
Add remote origin git remote add origin <url>
Check local branch name git branch
Stage all files git add .
Commit git commit -m "message"
Push and set upstream git push -u origin master
Verify remote git remote -v

Result

The home-lab repository is live on GitHub with the full lab structure visible. The process uncovered three separate failure points: overwriting the .git folder during file extraction, a branch name mismatch between local and remote, and GitHub defaulting to the wrong branch after the push. All three were resolved. This workflow, init, add remote, stage, commit, push, is the baseline process for all future lab documentation.

Adding Updates to the Repository

Once the repository is set up, pushing future changes is straightforward. Any time a lab file is added, edited, or reorganized, run the following three commands from the repository directory:

cd C:\Users\user\home-lab
git add .
git commit -m "describe what you changed"
git push

git add . stages everything that has changed since the last commit, including new files and deletions. The commit message should briefly describe what was updated, for example "add proxmox install lab" or "update networking notes". git push sends the commit to GitHub. Because the upstream was already set with -u during the initial push, no branch name is needed here.

If Git Credential Manager cached the login during the initial push, no additional authentication prompt will appear. If prompted, a browser popup will handle it the same way as before.

Updating the README

The README (README.md) is a regular file in the repository folder and does not update itself. To keep it current — for example, adding a new lab to the list or updating descriptions — open it in any text editor, make the changes, save it, and run the three commands as normal. git add . will stage the README change along with anything else that was modified.

Next: Proxmox Hypervisor Installation