A beginner's guide to

Dotfiles Management

Keep your settings in git and set up a new machine in minutes, not days. Dotfiles management is keeping your config files for shell, editor and git in a version-controlled repository so you can restore and sync them on any computer.

Guide updated 31 October 2026

Start here ↓
Start-up costFree
Best settingComputer
FeelsCurious
PopularityModerate
CostFree/very low
DifficultyModerate
Time needed30 minutes
Physical effortVery low
Social levelOptional
⌨️

Start this hobby

Your first practical checklist

01

Buy or borrow

Git and a free hosting account. Install git and make a free account on a code-hosting service; a private repository is a good place to begin.

02

First 30 minutes

List the dotfiles you really use with ls -a in your home folder and in ~/.config, and decide which ones matter.

03

First week goal

Clone the repo on a second machine or virtual machine, run your link script, and write down anything that failed.

04

Avoid this mistake

Putting your whole home directory under git captures caches and private files; track only chosen files, or ignore everything by default and add what you want.

Is this for me?

A quick fit check

Good signs

  • You use more than one computer, or reinstall often, and are tired of rebuilding your settings from memory.
  • You already use git and like the idea of history for your settings, so you can see when something changed.
  • You enjoy small automation jobs, such as writing an install script that sets everything up.

Think twice if

  • It only pays off if you actually use the same tools on several machines or rebuild often.
  • Public repositories expose your settings and your mistakes, so you must check carefully for personal details and secrets.
  • Settings differ between operating systems and machines, so shared files collect conditions and special cases that add complexity.

Make dotfiles management easier

Begin with a private repository holding just two files and a three-line script that links them. Add tools and templating only when you hit a real problem.

First session

What to do in the first 30 minutes

0–5 min

Run ls -a in your home folder and pick two config files you care about, such as .gitconfig and .zshrc.

5–15 min

Run git init in a new dotfiles folder, move the two files in, and create symlinks from your home folder to them.

15–25 min

Check the files for anything private, commit, and push to a private remote repository.

25–30 min

Write a short README listing what is in the repo and the command that links the files into place.

The appeal · Digital practice

Why try dotfiles management?

Dotfiles are the hidden configuration files in your home directory and ~/.config, such as .zshrc, .gitconfig and editor settings. Managing them means putting them in a git repository and linking or copying them into place, using a short script or a tool such as GNU Stow or chezmoi. It sits next to terminal customisation, which is about what the settings are, whereas this is about storing, versioning and syncing them. Most people start with a plain repo and symlinks, then add install scripts and per-machine differences.

✦

Quick recovery

A new laptop or fresh install becomes a clone and a script, rather than an afternoon of trying to remember what you had.

✦

A history of changes

Git shows what you changed and when, so you can undo a tweak that broke your shell or editor.

✦

Habits that carry over

Scripting, version control and reproducible setups apply equally to servers and projects.

Keep it simple

What you need to begin

  • Git and a free hosting accountInstall git and make a free account on a code-hosting service; a private repository is a good place to begin.
  • A few config files worth keepingStart with files you have already tuned, such as shell, git and editor settings, rather than your whole home directory.
  • A way to link files into placePlain symlinks created by a short script work well; Stow or chezmoi help once you have many files or several machines.
  • A spare machine or virtual machineA second computer, virtual machine or container lets you test restoring your setup without risking your main one.

The fundamentals

Four skills to build

01

Git basics

Committing, branching and pushing keep your configuration versioned and recoverable.

02

Symlinks and file layout

Understanding links, the home directory and ~/.config lets files live in a repo while programs still find them where they expect.

03

Bootstrap scripts

A short script that installs packages and links files, and is safe to run twice, turns a new machine into a familiar one.

04

Secrets and per-machine differences

Keeping passwords and tokens out of the repo and using conditionals or templates for different systems stops a shared setup becoming a mess.

Four small steps

Your first week

  1. List the dotfiles you really use with ls -a in your home folder and in ~/.config, and decide which ones matter.
  2. Create a git repository, move two files into it, and symlink them back to their original locations so everything still works.
  3. Push the repository to a private remote, after checking the files for passwords, tokens or keys.
  4. Clone the repo on a second machine or virtual machine, run your link script, and write down anything that failed.

The longer path

How progress usually looks

For dotfiles management, a sustainable rhythm is a couple of hours to set up, then a few minutes whenever you change a setting. Move forward when the current step feels repeatable, not merely possible once.

1

A tracked repository

You have a git repo with a handful of files and symlinks, backed up to a private remote.

2

Reproducible on a second machine

You can clone and link everything on a new computer, with a README that records the steps.

3

Automated bootstrap

A script or tool installs packages, handles macOS versus Linux differences, and keeps secrets out of the repository.

4

Maintained and shareable

Your repo is tidy and documented, you test it on fresh systems, and you may publish a cleaned version for others to learn from.

Progress markers

What improvement looks like

Beginner

You have a git repo with a handful of files and symlinks, backed up to a private remote.

Intermediate

A script or tool installs packages, handles macOS versus Linux differences, and keeps secrets out of the repository.

Confident

Your repo is tidy and documented, you test it on fresh systems, and you may publish a cleaned version for others to learn from.

Spend deliberately

A realistic cost plan

The headline starting range is Free, but access, borrowing and second-hand equipment can change that substantially.

Try it£0Git, a free hosting account and your existing config files.
Get going£0–£10Still free; the cost is your time writing a link script and testing it, plus perhaps a cheap book or course.
Later£0–£40Optional extras such as a password manager for secrets or a cheap second-hand machine for testing restores.

Learn with other people

Community and safety

☺

Finding your people

Many developers publish their dotfiles on public code-hosting sites, so browsing other people's repositories is the best way to learn. Local developer meet-ups, Linux user groups and the forums for whichever tool you pick are good places to ask questions.

+

Safety note

The main risk is leaking secrets: check every file before pushing, keep SSH private keys and tokens out of the repository, and stay private until you are sure. Back up a working config before replacing it with a link, and read other people's install scripts before running them.

Three common beginner mistakes

  • Putting your whole home directory under git captures caches and private files; track only chosen files, or ignore everything by default and add what you want.
  • Linking over an existing config can destroy a working setup; back up the originals and make your script refuse to overwrite without asking.
  • Writing a script that only works on your current machine means it fails when you need it most; test it regularly on a fresh virtual machine or container.

Good to know

One tip worth keeping

From the HobbyWiki notebook

The classic mistake is committing secrets such as API tokens, SSH private keys or passwords, especially into a public repository. Keep secrets in a separate untracked file, check what you are committing, and if one does leak, revoke it straight away, because deleting the commit does not make it safe.

Find your angle

Useful searches from here

Before you begin

Common questions

What are dotfiles?+

They are configuration files whose names begin with a dot, such as .bashrc or .gitconfig, which are hidden by default. Programs read them for your settings.

Should my dotfiles repository be public?+

Only once you have checked it carefully for secrets and personal details. Starting private is safer, and you can publish later.

Do I need a special tool such as Stow or chezmoi?+

No. A git repo and a short script of symlinks works. Tools help when you have many files or want different settings on different machines.

How do I handle different settings on work and home computers?+

Use conditions in your scripts, separate included files per machine, or a tool with templating. Keep the machine-specific parts small.

How is this different from backing up my files?+

A backup restores files as they were. A dotfiles repo adds version history, easy comparison, and an automated way to put your settings in place on a new or different system.