Linux, terminal and Git

Stage 7 · Lesson 8 of 8

Dotfiles in a Git repository

Shell scripts and automation

are your personal configuration files, named with a leading dot: .bashrc or .zshrc, .gitconfig, editor settings and aliases. Keep them in a Git with a small install script. The script creates a , a shortcut, from each file's usual place to the copy in the repository.

A new laptop or server then feels like home in minutes, and your setup is written down. Many developers publish their dotfiles on , which is a good way to pick up tricks. Keep secrets out: load from a separate file that Git does not track.

Common trapcopying someone else's huge dotfiles repository wholesale and ending up with a setup you do not understand.

A question to check yourself, an AI practice session and 1 cheat sheet entry come when you add the roadmap to your account. Add it

Resources for this stage

Start with· follow one of these

Practise

Keep handy

  • Paste or run a script to catch quoting and error-handling bugs before they bite

  • Check what each part of an unfamiliar command does before you put it in a script

Also worth your time

Mark this stage as not done?