doc: update "Install onto a new system" section
This commit is contained in:
parent
ced2772e73
commit
f53a73b67a
27
.README.md
27
.README.md
@ -13,25 +13,24 @@ dotfiles config --local status.showUntrackedFiles no
|
|||||||
|
|
||||||
## Install onto a new system
|
## Install onto a new system
|
||||||
|
|
||||||
```
|
The `checkout` command is expected to fail with a message.
|
||||||
alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME'
|
|
||||||
|
|
||||||
echo ".dotfiles" >> .gitignore
|
|
||||||
git clone --bare <git-repo-url> $HOME/.dotfiles
|
|
||||||
dotfiles checkout
|
|
||||||
dotfiles config --local status.showUntrackedFiles no
|
|
||||||
```
|
|
||||||
|
|
||||||
The step above might fail with a message.
|
|
||||||
This is because your $HOME folder might already have some stock configuration
|
This is because your $HOME folder might already have some stock configuration
|
||||||
files which would be overwritten by Git.
|
files which would be overwritten by Git.
|
||||||
I provide you with a possible rough shortcut to move all the offending files
|
The “BKDIR” part is a rough shortcut to move all the offending files
|
||||||
automatically to a backup folder:
|
automatically to a backup folder:
|
||||||
|
|
||||||
```
|
```
|
||||||
mkdir -p .dotfiles-backup
|
git clone --bare <git-repo-url> $HOME/.dotfiles
|
||||||
dotfiles checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | \
|
|
||||||
xargs -I{} mv {} .dotfiles-backup/{}
|
alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME'
|
||||||
|
|
||||||
|
dotfiles config --local status.showUntrackedFiles no
|
||||||
|
|
||||||
|
BKDIR=".dotfiles-backup/";
|
||||||
|
dotfiles checkout 2>&1 | egrep "\s+" | awk {'print $1'} |
|
||||||
|
xargs -I{} sh -c "mkdir -p \$(dirname ${BKDIR}{}); mv -iv {} ${BKDIR}{}";
|
||||||
|
|
||||||
|
dotfiles checkout
|
||||||
```
|
```
|
||||||
|
|
||||||
## Other Tools
|
## Other Tools
|
||||||
|
Loading…
Reference in New Issue
Block a user