aviemet / aliases

Git and cli alises for *nix systems

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Avram's Dotfiles

To start, create a bare repository in your home folder:

git init --bare $HOME/.cfg

Set a local alias for config to easily interact with our dotfiles:

alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
config config --local status.showUntrackedFiles no

Using this command, or manually, add the alias to your terminal config:

echo "alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'" >> $HOME/.zshrc

Make sure the .cfg folder is in .gitignore

Clone the files to your home folder and run checkout:

git clone --bare https://github.com/aviemet/aliases.git $HOME/.cfg
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
config checkout

If you are prompted regarding collisions, backup the offending files and run config checkout again.

Credit to this article

About

Git and cli alises for *nix systems