Browse Source

Document dotfiles

master
Chris Smith 5 years ago
parent
commit
45ccd38893
1 changed files with 28 additions and 0 deletions
  1. 28
    0
      content/docs/software/linux.adoc

+ 28
- 0
content/docs/software/linux.adoc View File

@@ -6,6 +6,34 @@
6 6
 
7 7
 == Linux
8 8
 
9
+=== Dotfiles
10
+
11
+I store my dotfiles in Git so I can easily keep track of
12
+changes and sync them between devices.
13
+
14
+To do so I create a bare git repository in my home directory,
15
+and configure it to not show untracked files:
16
+
17
+[source]
18
+----
19
+cd $HOME
20
+git init --bare $HOME/.dotfiles
21
+git --git-dir=$HOME/.dotfiles config --local status.showUntrackedFiles no
22
+----
23
+
24
+I then have the following in my `.bash_aliases` to make it easier to
25
+interact with when I want to perform git operations:
26
+
27
+[source,bash]
28
+----
29
+# dotfiles
30
+alias config='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
31
+----
32
+
33
+Some of my dotfiles have API keys and other semi-sensitive bits and bobs,
34
+so I encrypt the entire repository with
35
+https://github.com/spwhitton/git-remote-gcrypt[git-remote-gcrypt].
36
+
9 37
 === Random commands
10 38
 
11 39
 Split some pages from a PDF::

Loading…
Cancel
Save