blob: 3dc6114b8f5f8162f9c6faed0cc67ecb6365fe79 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# dotfiles
A Git repository to track my personal GNU/Linux dotfiles. It should be located
in the config directory `~/.config` where programs should store their
configuration files.
## Migrate from earlier dotfiles versions
The dotfiles project used to create a bare Git repository in `~/dotfiles.git`
and a worktree in `~` to care about programs that place configuration files in
`~` directly.
Now dotfiles does not care about them anymore. It is much cleaner to save
configuration files in `~/.config` and much simpler to use a simple Git
repository than using a bare repo with worktree.
Use this command to remove a bare repository based installation of dotfiles:
```
rm -rf ~/dotfiles.git
```
After this step you can proceed with installation like described below.
## Installation
Start by switching to your config directory and initialize an empty Git
repository in it:
```bash
mkdir -p ~/.config # create if it does not exist
cd ~/.config
git init
```
Then you should add the remote repository from xengineering.eu and fetch the
content:
```bash
git remote add origin https://cgit.xengineering.eu/dotfiles
git fetch
```
Checkout the preferred branch (default is `main`). Add ` --force` after
`checkout` if the following command fails and you want to overwrite existing
files:
```bash
git checkout main
```
Finally you should link some configuration files from programs which expect
their config file in `~` instead of `~/.config`:
```bash
cd ~
ln -s .config/.bash_profile .bash_profile
ln -s .config/.bashrc .bashrc
ln -s .config/.vimrc .vimrc
ln -s .config/.zshrc .zshrc
```
## Update
Simply run this command from any location on your computer:
```bash
git -C ~/.config pull
```
## Add or update files
You can use `~/.config` like a normal Git repository.
|