How to use Github to manage dotfiles?

前端 未结 7 723
萌比男神i
萌比男神i 2020-12-24 13:08

I stored my dotfiles in github, with lots pains, because of no automation. I have to update it myself.

Is there a way that can auto install/update/sync dotfiles? I m

7条回答
  •  一整个雨季
    2020-12-24 13:51

    The main source of information about dotfiles is dotfiles.github.io.

    It references blog posts like Using Git and Github to Manage Your Dotfiles, based on a symlink method.

    For starters, we’ll be putting all of our dotfiles into a folder called dotfiles, like so: /home/smalleycreative/dotfiles/vimrc.
    Then, we’ll simply symlink to them from our home directory.


    Jaime mentions the Atlassian tutorial "The best way to store your dotfiles: A bare Git repository"

    The technique consists in storing a Git bare repository in a "side" folder (like $HOME/.cfg or $HOME/.myconfig) using a specially crafted alias so that commands are run against that repository and not the usual .git/ local folder, which would interfere with any other Git repositories around.
    (and then the dotfiles folder is managed as a git repo)

提交回复
热议问题