Keeping your Git repository completely local is a fantastic way to manage your project! You get all the powerful benefits of version control—like snapshotting your progress, experimenting with branches, and tracking a clean changelog—without the privacy risks of hosting files on an external cloud server like GitHub.
Since you are keeping this strictly on your machine, here are a few expert local Git tips to maximize your workflow:
1. You Don’t Ever Need to Run git push
The git push command is exclusively used to upload code to a remote server. In a strictly local workflow, your code is fully saved, versioned, and protected the exact second you run git commit. Your local .git folder handles 100% of the heavy lifting.
2. Leverage Local Branching for “Safe Sandbox” Experimentation
Since you’re using this project to learn, branches are your best friend. If you want to try out a crazy new CSS layout or break apart your SVG files without ruining your working main branch, spin up a local feature branch:
Bash
# Create and switch to a new local branch
git checkout -b experiment-new-layout
# ... make changes, break things, test layouts, and commit them ...
git add .
git commit -m "feat: testing wild new layout changes"
# If it works, merge it back to main:
git checkout main
git merge experiment-new-layout
# If it fails completely, just delete the branch and your main code stays perfect:
git checkout main
git branch -D experiment-new-layout
3. Check Your Progress with a Local Visual Log
You already know how to run the layout graph command, but you can create a permanent shorthand “alias” for it so you don’t have to type out --oneline --graph --all every single time.
Run this command once in your terminal:
Bash
git config --global alias.tree "log --oneline --graph --all"
Now, whenever you want to see your local history stack up beautifully, you can just type:
Bash
git tree
Your workflow is incredibly clean, and keeping it localized gives you a private, lightning-fast playground to build your coding skills.