diff options
author | JustineSmithies <justine@smithies.me.uk> | 2023-05-13 17:04:03 +0100 |
---|---|---|
committer | JustineSmithies <justine@smithies.me.uk> | 2023-05-13 17:04:03 +0100 |
commit | 2046150e142409792b08302c93bb62a8e7e4346c (patch) | |
tree | f5733d1ab222ffeb80334bbd6fa48796646bdbd9 /posts | |
parent | 59120d1acdf37bb17a026488494345aada00bb26 (diff) |
Initial commit
Diffstat (limited to 'posts')
-rw-r--r-- | posts/dotfiles.md | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/posts/dotfiles.md b/posts/dotfiles.md new file mode 100644 index 0000000..6bd59c7 --- /dev/null +++ b/posts/dotfiles.md @@ -0,0 +1,24 @@ +# How I store my dotfiles. + +I use a bare repository to sync my dotfiles and set it up as follows: + +``` +git init --bare $HOME/.cfg +alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME' +config config --local status.showUntrackedFiles no +config add .config/nvim/init.lua +config commit -m "Added init.lua" +git remote add origin REMOTE_URL +git push origin master +``` + +To install them from mine or someone else's git repo do the following: + +``` +echo ".cfg" >> .gitignore +git clone --bare REMOTE-GIT-REPO-URL $HOME/.cfg +alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME' +config config --local status.showUntrackedFiles no +config checkout +``` + |