Git without the Hub
Git is an invaluable tool in my development workflow, and GitHub is great for async collaboration on a large project with a team. However, when working on solo projects I find that GitHub can be slightly overkill for what I’m trying to accomplish.
During solo development my goals are to learn & experiment often with something new. For these types of projects, I’ve found the only features of git that I need are:
- Atomic commits that can easily be reverted or cherry-picked
- Branches for larger changes
- Overview of the projects history
Things like pull-requests, forking, and CI/CD actions aren’t necessary. I don’t
really even need to clone the repo to another computer. Being a fan of trunk
based development (hearkening from my time
at Etsy), I simply commit to main and keep moving.
Bare Origins
Since git is decentralized, you can set your origin repo to pretty much any
kind of file storage location. My projects all begin on an external
hard drive /dev/sdc1 which is mounted to /media/lab on my machine.
This allows me to create a bare repo to use as my origin for a new experiment without needing to authenticate over the internet:
git init --bare /media/lab/experiment
Then I can clone it to my local machine and get to work:
git clone /media/lab/experiment ~/Workspace/experiment
Or if I already have a local experiment repo and want to push it to the bare origin:
git remote add origin /media/lab/experiment
git push origin main
If I need to access it from different machines without juggling the hard drive between them, I setup the bare repo on a VPS via ssh and have it hosted on a subdomain:
git remote set-url origin [email protected]:experiment.git
I’ll also move things here when the work is important enough to warrant a backup.
Finally if the experiment becomes successful enough to share with others, I can easily update the origin to a public location such as GitHub:
git remote set-url origin [email protected]:ahashim/experiment.git
Once the repo is setup and commits are flowing, I want to keep track of what I’ve accomplished.
Birds Eye View
To see the big picture, the git log gives me a quick rundown of what I’ve built so far:
git log --all --decorate --graph

However, I find it useful to have a UI that displays the diffs alongside the commit log for added context. Lazygit is an excellent command line utility for this:
lazygit

If I require a desktop GUI in order to scroll around & have full mouse capabilities, then i’ll quickly fire up a Git WebUI server for a visual interface:
git webui

This gives me a page that I can bookmark in the browser, and leave open in a tab while working to give me an overview of my progress.
It may not have all the GitHub UI bells & whistles, but it’s simple and effective which leaves me time to focus on what’s most important: completing the experiment.
Fast Iteration, Zero Friction
This workflow strips git down to its essentials: fast commits, instant reverts, and zero context-switching between terminal and browser. For solo experiments where iteration speed matters more than collaboration features, less really is more.