Tech/HowTo/Home Directory Dot-files in Git
Jump to navigation
Jump to search
Creation
For the creation of a repo of existing dotfiles in your home directory the process is like.
- Change your current working directory to your home
cd ~/
- In your home directory create a .gitignore like:
# Ignore all * # Double Negative Include !.gitignore # Specifically identify directories and files to keep !README.md !.bash_aliases
- Create a README.md for your sanity later
Install
To install the dot-files on a new user account
- As your user
cd ~/
git init
git remote add origin user@server.tld:user/dotfiles.git
git fetch
git checkout -t origin/main