Update README.md

This commit is contained in:
Leo Alho 2024-04-21 19:26:27 +00:00 committed by GitHub
parent 183abcc9bb
commit bf57193e1f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,11 +1,20 @@
# Dotfiles # Dotfilesb
This directory is inspired by this https://www.atlassian.com/git/tutorials/dotfiles blogpost, which in turn was inspired by this https://news.ycombinator.com/item?id=11070797 HN thread The purpose of this directory is to monitor dotfiles via a bare git repository. It is inspired by this https://www.atlassian.com/git/tutorials/dotfiles blogpost, which in turn was inspired by this https://news.ycombinator.com/item?id=11070797 HN thread.
THe repo has two branches, the main branch I use on Ubuntu distros with an GNOME DE. The arch branch is surprisingly for my minimal arch setup, currently running X11 + openbox + polybar.
## Setting up this project initially: ## Setting up this project initially:
1. git init --bare $HOME/.cfg 1. git init --bare $HOME/.cfg
2. alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME' or echo "alias config='usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'" >> $HOME/.bashrc 2. alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME' or echo "alias config='usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'" >> $HOME/.bashrc
3. config config --local status.showUntrackedFiles no 3. config config --local status.showUntrackedFiles no
## Installing on a new system
While in $HOME
1. Add the following to .bashrc alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
2. source .bashrc
3. echo ".cfg">> .gitignore. This is to preent potential recursive problems
4. git clone --bare https://github.com/leoalho/dotfiles.git $HOME/.cfg
5. Checkout the content to $HOME: config checkout
## .git_aliases ## .git_aliases
To use the git aliases in your gitconfig. Add the following lines to your .gitconfig: To use the git aliases in your gitconfig. Add the following lines to your .gitconfig:
[include] [include]