https://github.com/bapjiws/dotfiles
https://github.com/bapjiws/dotfiles
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/bapjiws/dotfiles
- Owner: bapjiws
- Created: 2019-11-05T22:17:37.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-09-09T07:15:16.000Z (9 months ago)
- Last Synced: 2024-09-09T08:50:52.310Z (9 months ago)
- Language: Lua
- Size: 378 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
The idea is taken from [here](https://www.atlassian.com/git/tutorials/dotfiles) (also, see the article on how to install your dotfiles onto a new system):
```bash
# create a folder ~/.cfg which is a Git bare repository that will track our files
git init --bare $HOME/.cfg
# create an alias config which we will use instead of the regular git when we want to interact with our configuration repository
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
# set a flag - local to the repository - to hide files we are not explicitly tracking yet. This is so that when you type config status and other commands later, files you are not interested in tracking will not show up as untracked
config config --local status.showUntrackedFiles no
# (optional) add the alias definition to your .bashrc
echo "alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'" >> $HOME/.bashrc
```