63 lines
1.4 KiB
Markdown
63 lines
1.4 KiB
Markdown
# Bare Git Repository
|
|
|
|
- https://www.atlassian.com/git/tutorials/dotfiles
|
|
- StreakyCobra
|
|
|
|
## Starting from scratch
|
|
|
|
```
|
|
git init --bare $HOME/.dotfiles
|
|
alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME'
|
|
dotfiles config --local status.showUntrackedFiles no
|
|
```
|
|
|
|
## Install onto a new system
|
|
|
|
The `checkout` command is expected to fail with a message.
|
|
This is because your $HOME folder might already have some stock configuration
|
|
files which would be overwritten by Git.
|
|
The “BKDIR” part is a rough shortcut to move all the offending files
|
|
automatically to a backup folder:
|
|
|
|
```
|
|
git clone --bare <git-repo-url> $HOME/.dotfiles
|
|
|
|
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
|
|
|
|
```
|
|
lazygit --git-dir=$HOME/.dotfiles --work-tree=$HOME
|
|
```
|
|
|
|
# Install recent versions of applications
|
|
|
|
## kitty
|
|
|
|
- https://sw.kovidgoyal.net/kitty/binary/
|
|
|
|
```
|
|
sudo apt-get install kitty-terminfo
|
|
sh ~/.config/kitty/installer.sh
|
|
```
|
|
|
|
**Note**:
|
|
Kitty prepends its _bin_ folder to the path.
|
|
So it is more coherent/simpler to copy this behaviour into Zsh.
|
|
|
|
|
|
## lazygit
|
|
|
|
```
|
|
go install github.com/jesseduffield/lazygit@latest
|
|
```
|