|
|
|
@ -6,12 +6,12 @@ Configuration files for syncing between machines. See https://www.atlassian.com/ |
|
|
|
|
|
|
|
|
|
|
|
1. Clone the repo: |
|
|
|
1. Clone the repo: |
|
|
|
``` |
|
|
|
``` |
|
|
|
$ git clone --bare https://github.com/fredrikekre/.dotfiles.git $HOME/.dotfiles.git |
|
|
|
$ git clone --bare https://github.com/fredrikekre/.dotfiles.git "$HOME/.dotfiles.git" |
|
|
|
``` |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
2. Define a temporary `dotfiles` alias: |
|
|
|
2. Define a temporary `dotfiles` alias: |
|
|
|
``` |
|
|
|
``` |
|
|
|
$ alias dotfiles='git --git-dir=$HOME/.dotfiles.git/ --work-tree=$HOME' |
|
|
|
$ alias dotfiles='git --git-dir="$HOME/.dotfiles.git/" --work-tree="$HOME"' |
|
|
|
``` |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
3. Check out the files: |
|
|
|
3. Check out the files: |
|
|
|
@ -19,7 +19,15 @@ Configuration files for syncing between machines. See https://www.atlassian.com/ |
|
|
|
$ dotfiles checkout |
|
|
|
$ dotfiles checkout |
|
|
|
``` |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
4. Add the following to the top of `.bashrc` |
|
|
|
4. Configure the new local repo to hide untracked files and to use the local gitignore file |
|
|
|
|
|
|
|
``` |
|
|
|
|
|
|
|
$ dotfiles config --local status.showUntrackedFiles no |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$ dotfiles config --local core.excludesfile "$HOME/.gitignore.dotfiles" |
|
|
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5. Add the following to the top of `.bashrc` |
|
|
|
``` |
|
|
|
``` |
|
|
|
# Include cross-system common parts from .dotfiles.git repo |
|
|
|
# Include cross-system common parts from .dotfiles.git repo |
|
|
|
if [ -f ~/.bashrc.dotfiles ]; then |
|
|
|
if [ -f ~/.bashrc.dotfiles ]; then |
|
|
|
@ -27,9 +35,4 @@ Configuration files for syncing between machines. See https://www.atlassian.com/ |
|
|
|
fi |
|
|
|
fi |
|
|
|
``` |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
5. Configure the new local repo to hide untracked files |
|
|
|
|
|
|
|
``` |
|
|
|
|
|
|
|
$ dotfiles config --local status.showUntrackedFiles no |
|
|
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6. Reboot the shell |
|
|
|
6. Reboot the shell |
|
|
|
|