<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/managing-my-dotfiles-as-a-git-repository-92btmsnfh" -->

---
title: Managing my dotfiles as a git repository | daily.dev
description: A simple approach to managing dotfiles by making $HOME itself a git repository. The key trick is a one-byte .gitignore containing just '*', which ignores all...
canonical: https://daily.dev/posts/managing-my-dotfiles-as-a-git-repository-92btmsnfh
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Managing my dotfiles as a git repository | daily.dev
og:description: A simple approach to managing dotfiles by making $HOME itself a git repository. The key trick is a one-byte .gitignore containing just '*', which ignores all...
og:url: https://daily.dev/posts/managing-my-dotfiles-as-a-git-repository-92btmsnfh
og:image: https://api.daily.dev/og/posts/92btMsnFH.png
og:image:alt: Managing my dotfiles as a git repository
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Managing my dotfiles as a git repository

**[Drew DeVault](https://daily.dev/sources/drewdevault)** · 3 min read · 0 upvotes · 0 comments

## Summary

A simple approach to managing dotfiles by making $HOME itself a git repository. The key trick is a one-byte .gitignore containing just '*', which ignores all files by default, requiring explicit 'git add -f' to track specific config files. Once tracked, files behave normally with git. Setting up a new machine is straightforward with a few git commands. The approach also covers per-host customization using hostname-based directory structures in $PATH and include directives in config files like sway, avoiding the need for specialized dotfile management tools like GNU stow.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://drewdevault.com/2019/12/30/dotfiles.html>

## Similar posts on daily.dev

- [Modernizing My Dotfiles](https://daily.dev/posts/modernizing-my-dotfiles-jloikjowa) · FREEK.DEV · 0 upvotes · 0 comments
- [Git: Don’t create .gitkeep files, use .gitignore instead](https://daily.dev/posts/git-don-t-create-gitkeep-files-use-gitignore-instead-xdozp2e8i) · Hacker News · 1 upvotes · 0 comments
- [Ansible Dotfiles for Mac: Keep Your Setup Up to Date](https://daily.dev/posts/ansible-dotfiles-for-mac-keep-your-setup-up-to-date-2wjkkutaf) · Alex CloudStar · 0 upvotes · 0 comments
- [A tour of my dotfiles](https://daily.dev/posts/a-tour-of-my-dotfiles-da1v7cmp0) · FREEK.DEV · 92 upvotes · 6 comments

---

Tags: [#dotfiles](https://daily.dev/tags/dotfiles), [#git](https://daily.dev/tags/git), [#shell](https://daily.dev/tags/shell), [#unix](https://daily.dev/tags/unix)

[View this post on daily.dev](https://daily.dev/posts/managing-my-dotfiles-as-a-git-repository-92btmsnfh)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Managing my dotfiles as a git repository","url":"https://daily.dev/posts/managing-my-dotfiles-as-a-git-repository-92btmsnfh","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/managing-my-dotfiles-as-a-git-repository-92btmsnfh"},"datePublished":"2026-03-31T12:28:38.578Z","dateModified":"2026-10-14T02:35:28.620Z","description":"A simple approach to managing dotfiles by making $HOME itself a git repository. The key trick is a one-byte .gitignore containing just '*', which ignores all...","image":"https://media.daily.dev/image/upload/s--HRgLpUt6--/f_auto/v1722860399/public/Placeholder%2003","thumbnailUrl":"https://media.daily.dev/image/upload/s--HRgLpUt6--/f_auto/v1722860399/public/Placeholder%2003","isAccessibleForFree":true,"articleSection":"Drew DeVault","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Drew DeVault","logo":"https://media.daily.dev/image/upload/s--BGhGBu0U--/f_auto,q_auto/v1774960025/logos/drewdevault?_a=BAMAMiWQ0","url":"https://daily.dev/sources/drewdevault"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/managing-my-dotfiles-as-a-git-repository-92btmsnfh","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"dotfiles,git,shell,unix","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Drew DeVault","item":"https://daily.dev/sources/drewdevault"},{"@type":"ListItem","position":3,"name":"Managing my dotfiles as a git repository"}]}
```

