Need help with .dotfiles?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

265 Stars 19 Forks MIT License 604 Commits 1 Opened issues


There's no place like ~ !

Services available


Need anything else?

Contributors list

# 106,583
Arch Li...
604 commits


There's no place like ~ !

Table of Contents


Awesome WM Awesome WM Awesome WM


This repository contains my personal configuration files (also known as dotfiles). The package lists can be found in

. To install all official packages, you can use for example
cat .pkglist/pacman | pacman -S -

In the following sections I'll explain how this dotfiles repository was set up, how to use it and how to restore them, for example on a new device.

Note: I migrated to by Eli Schwartz, which is a thin wrapper for git that implements the method described here.

Setup Repository

Setup a bare git repository in your home directory. Bare repositories have no working directory, so setup an alias to avoid typing the long command. Add the git directory

to the gitignore as a security measure. Setup remote and push. Hide untracked files when querying the status.
git init --bare "$HOME/.dotfiles"

echo 'alias dotfiles="/usr/bin/env git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME"'
>> "$HOME/.zshrc" source "$HOME/.zshrc"

echo '.dotfiles' >> "$HOME/.gitignore" dotfiles add "$HOME/.gitignore" dotfiles commit -m 'Git: Add gitignore'

dotfiles remote add origin dotfiles push --set-upstream origin master dotfiles config --local status.showUntrackedFiles no

Track Files

Use the default git subcommands to track, update and remove files. You can obviously also use branches and all other features of git.

dotfiles status
dotfiles add .zshrc
dotfiles commit -m 'Zsh: Add zshrc'
dotfiles add .vimrc
dotfiles commit -m 'Vim: Add vimrc'
dotfiles push

To remove a file from the repository while keeping it locally you can use:

dotfiles rm --cached ~/.some_file

Restore Configurations

First clone dependent repositories, in this case for example

. Clone your dotfiles repository as bare repository. Setup temporary alias and then checkout. If there exist files that collide with your repository (like a default
), the files will be moved to
. Then update all submodules and again hide untracked files when querying the status.
git clone \

git clone --bare --recursive

function dotfiles() { /usr/bin/env git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME" "[email protected]" }

dotfiles checkout if [ "$?" -ne 0 ]; then mkdir -p "$HOME/.dotfiles.bak" dotfiles checkout 2>&1
| grep -P '^\s+[\w.]'
| awk {'print $1'}
| xargs -I{} sh -c 'cp -r --parents "{}" "$HOME/.dotfiles.bak/" && rm -rf "{}"' dotfiles checkout fi

dotfiles submodule update --recursive --remote dotfiles config --local status.showUntrackedFiles no

Note that the automatic moving of already existing (thus conflicting) files fails if there are too many of them (git cuts the message at some point).

The short variant, using a script with the commands above:


(Note: This is for my personal use. Instead of directly sourcing the install script, you should save it somewhere on your system and review it.)

Additional Commands

Instead of the alias provided above, you can use following function.

will show all tracked files,
will show those files in a tree format (requires the package
). You may need to use a pager for these commands.
dotfiles() {
    case "$1" in
            dotfiles ls-tree --full-tree -r --name-only HEAD "[email protected]"
            if hash treeify 2>/dev/null; then
                dotfiles ls-tree --full-tree -r --name-only HEAD "[email protected]" | treeify
                dotfiles listall
            /usr/bin/env git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME" "[email protected]"

can provide
autocompletion of the
command for your equivalent
compdef dotfiles='git'

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.