Skip to content

jeffrydegrande/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 

Repository files navigation

These are my config files.

I'm using bare a bare repository as described here

or ... in short:

Prerequisites

  • Install Git

Setting up the Bare Git repository

First, we setup a bare Git repository in the home directory at $HOME/.dotfiles, this repository will track our files.

git init --bare $HOME/.config

We create an alias config, to interact with this repository.

alias config='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'

Set a flag - local to the repository - to hide files which are not explicitly tracked.

config config --local status.showUntrackedFiles no

Add this alias to .bashrc or .zshrc to avoid re-entering it.

Usage

Using this repository is same as using Git, replace git with your newly created config alias. For example:

config status
config add .vimrc
config commit -m "Add vimrc"
config add .bashrc
config commit -m "Add bashrc"
config push

Bootstrapping on a new machine

To set up this Dotfiles tracking on a new machine, you need to clone the repository. Ensure your source repository ignores the folder where you'll clone it into, to avoid recursion problems.

echo ".dotfiles" >> .gitignore

Next, clone the repository.

git clone --bare <git-repo-url> $HOME/.dotfiles

Define the alias in the current shell scope.

alias config='/usr/bin/git --git-dir=$HOME/.dotfile/ --work-tree=$HOME'

Checkout the content from the bare repository to your $HOME.

config checkout

If you already have configuration files with identical names, this step might fail. Backup and remove those files. Retry the checkout if you get an error.

Set the flag showUntrackedFiles to no on this specific (local) repository.

config config --local status.showUntrackedFiles no

You're done, now you can use the config command to manage your dotfiles.

About

My dotfiles, neovim, tmux, kitty, i3wm, ...

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published