- commit the alias to your
.bashrc
or.zshrc
alias config='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
- your source repository ignores the folder where you'll clone it
echo ".dotfiles" >> .gitignore
- clone dotfiles into a bare repository in a "dot" folder of your '$HOME'
git clone --bare https://github.com/AltairShmily/dotfiles.git $HOME/.dotfiles
- define the alias in the current shell scope
alias config='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
- checkout the actual content from the bare repository to your '$HOME'
config checkout
- set the flag 'showUntrackedFiles' to 'no' on this local repository
config config --local status.showUntrackedFiles no
- now you can type 'config' commands to add and update the dotfiles
config status config add .zshrc config commit -m "Add zshrc" config add .bashrc config commit -m "Add bashrc" config push --set-upstream origin main
-
Notifications
You must be signed in to change notification settings - Fork 0
AltairShmily/dotfiles
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published