Skip to content

dotfiles - various system and application configuration files

Notifications You must be signed in to change notification settings

walderf/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

figgit - a dotfile (config) git alias


This really is the simplest way to manage dotfiles.

All you really need is for git to be installed on the local system.

What you will learn here is not much different than what is provided in the above threads. The key differences being the fact that I chose to name my alias "figgit" because "config" never struck me as an appropriate name. Also, I named my dotfile bare git repo directory ".dotfiles" because it just makes the most sense.

Note: This guide assumes you're using zsh as your shell and have git installed.

^


STEP 1:

edit ~/.zshrc.local

add the following:
# dotfile (config) git repo - "figgit"
zstyle ':completion:*:*:git:*' user-commands figgit:'figgit dotfile git alias'
alias figgit='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'

^


STEP 2:

edit /usr/share/zsh/functions/Completion/Unix/_git

replace the line containing:
(( $+opt_args[--git-dir] )) && local -x GIT_DIR=$opt_args[--git-dir]
with:
(( $+opt_args[--git-dir] )) && local -x GIT_DIR=${(e)~opt_args[--git-dir]}

(( $+opt_args[--work-tree] )) && local -x GIT_WORKTREE=${(e)~opt_args[--work-tree]}

^


STEP 3:

create the git bare repository

git init --bare $HOME/.dotfiles
figgit config --local status.showUntrackedFiles no

add some dotfiles to the repo

figgit add .zshrc.local
figgit commit -m "~/.zshrc.local"

# remember to use your <tab> completion here :)

figgit add ~/.config/nvim/init.vim
figgit commit -m "init.vim"

push to remote repo

figgit push

^


About

dotfiles - various system and application configuration files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published