Skip to content

zanculmarktum/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

9df09d4 · Mar 1, 2025
Mar 15, 2022
Mar 1, 2025
Nov 29, 2022
May 25, 2019
May 27, 2020
Apr 25, 2019
Oct 30, 2018
Dec 27, 2019
Jan 5, 2023
Mar 5, 2022
Jan 6, 2023
Nov 22, 2021
Jul 6, 2019
Feb 21, 2025
Jul 26, 2020
Oct 17, 2024
Feb 18, 2022
Mar 21, 2018
Oct 15, 2024
May 18, 2020
Apr 30, 2022
Feb 18, 2022
Dec 18, 2022
Sep 29, 2019
Oct 22, 2020
Jan 25, 2019
Feb 15, 2018
May 5, 2019
Jul 25, 2022
Apr 28, 2019
Nov 29, 2022
Oct 5, 2019
Nov 29, 2022
Oct 10, 2019
Aug 29, 2018
Feb 18, 2022
Apr 8, 2021
Jun 8, 2020

Repository files navigation

Description

This is the ideal dotfiles repository that doesn't clutter up the working tree with unwanted/untracked dotfiles.

Untracked dotfiles will never appear in git status ever, because git will only track the files that you specified in .gitignore.

How is that possible? The magic behind this is done by the .gitignore himself.

First, we exclude everything:

*

Then, include the .gitignore:

!.gitignore

To include the desired dotfiles, prefix it with !. For example:

!.xinitrc

To include a folder, first add the folder then add that folder again but with ** appended. Note that this will include everything inside the folder.

!.vim
!.vim/**

To include a folder but track only a specific files inside it:

(this will only track mpv.conf)

!.config
!.config/mpv
!.config/mpv/mpv.conf

Test

Now, let's compare this to normal .gitignore-less dotfiles repository:

$ git status
On branch master
Untracked files:
  (use "git add <file>..." to include in what will be committed)

        .Xmodmap
        .Xresources
        .aria2/
        .bash_aliases
        .bash_completion
        .bash_functions
        .bash_miscs
        .bash_profile
        .bashrc
        .config/
        .conkerorrc
        .dwm/
        .gbp.conf
        .gitconfig
        .gitignore
        .gnupg/
        .gvimrc
        .infokey
        .inputrc
        .local/
        .nzbget
        .pystartup
        .quiltrc-dpkg
        .termux/
        .tmux.conf
        .urxvt/
        .vim/
        .vimrc
        .xbindkeysrc
        .xinitrc

nothing added to commit but untracked files present (use "git add" to track)

You see that it's full of config files that you don't wish to be put in the repository.

The repository with .gitignore on the other hand though is clean:

$ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

So, no matter how much programs you'd install in the future, their config files won't register ever in the repository. No more git add . by accident that will put unwanted files in the repository.

Installation

$ git clone --recurse-submodules https://github.com/zanculmarktum/dotfiles.git
$ rm -rf ~/.git
$ mv dotfiles/.git ~
$ cd && git checkout .
$ rm -rf dotfiles