I am currently trying to keep track of my config files in a repo to be able to get the configa back together easily if/when I change distro, but I am not sure if that’s the best way or if I should be using some tool to help me since I some programs keep preferences in other directories other then $HOME (at least I think so). Can you guys share with me your must used/trusted simple process for this?

Thank you and specially thanks to everyone who is being helpful in this community for the past few weeks, I’ve learned much and got some very useful tips from the comments in my posts and in other people posts too.

  • madcow
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    I really like the simplicity of this workflow by StreakyCobra on HN (explained as a blog post here):

    I use:

    git init --bare $HOME/.myconf
    alias config='/usr/bin/git --git-dir=$HOME/.myconf/ --work-tree=$HOME'
    config config status.showUntrackedFiles no
    

    where my ~/.myconf directory is a git bare repository. Then any file within the home folder can be versioned with normal commands like:

    config status
    config add .vimrc
    config commit -m "Add vimrc"
    config add .config/redshift.conf
    config commit -m "Add redshift config"
    config push
    And so one…
    

    No extra tooling, no symlinks, files are tracked on a version control system, you can use different branches for different computers, you can replicate you configuration easily on new installation.