first commit
This commit is contained in:
35
pages/Scripts/DotFiles.md
Normal file
35
pages/Scripts/DotFiles.md
Normal file
@@ -0,0 +1,35 @@
|
||||
title:: DotFiles
|
||||
updated:: 2021-08-04 14:37:25+00:00
|
||||
created:: 2020-08-19 11:26:42+00:00
|
||||
|
||||
[https://www.atlassian.com/git/tutorials/dotfiles](https://www.atlassian.com/git/tutorials/dotfiles)
|
||||
install git and git-lfs
|
||||
```bash
|
||||
apt install git git-lfs
|
||||
```
|
||||
|
||||
setup the directory and alias
|
||||
```bash
|
||||
git init --bare $HOME/.cfg
|
||||
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
|
||||
config config --local status.showUntrackedFiles no
|
||||
echo "alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'" >> $HOME/.bashrc
|
||||
``````
|
||||
|
||||
example of loading stuff into the repo
|
||||
```bash
|
||||
config status
|
||||
config add .vimrc
|
||||
config commit -m "Add vimrc"
|
||||
config add .bashrc
|
||||
config commit -m "Add bashrc"
|
||||
config push
|
||||
```
|
||||
|
||||
init a new machine with the repo
|
||||
```bash
|
||||
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
|
||||
echo ".cfg" >> .gitignore
|
||||
git clone --bare git@github.com:sstent/dotfiles.git $HOME/.cfg
|
||||
config checkout
|
||||
```
|
||||
Reference in New Issue
Block a user