Slowly but surely I will learn what all of these dots mean.
The method for using these dotfiles is the git "bare" repo.
This way the working tree for the git repo can be in the HOME directory, while the git directory can be stored somewhere else. (in our case $HOME/dotfiles.git)
The way to set up a new system follow these instructions:
-
Make sure git is installed.
-
Make sure you're working in your $HOME directory.
-
Add the
git df
alias to git:git config --global alias df="!git --git-dir=$HOME/dotfiles.git/ --work-tree=$HOME"
- (or use my .gitconfig
wget https://raw.githubusercontent.com/maxprehl/dotfiles/master/.gitconfig
)
-
Clone the repo's git directory ONLY:
git df clone --bare https://github.com/maxprehl/dotfiles.git $HOME/dotfiles.git
- You should now have a new folder in your home directory called
dotfiles.git
- The only thing in there are some other directories that git will use to keep track of the repos.
-
Set the repo to NOT show untracked files
git df config --local status.showUntrackedFiles no
- Since the working directory is $HOME, all subdirectories will show up as untracked, which we DON'T want.
- Instead we'll just manually add/update the configs we want to track.
-
Back up offending files
mkdir -p .dotfiles-backup && \ git df checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | \ xargs -I{} mv {} .dotfiles-backup/{}
-
Pull down the relevant files. (you may get warnings about overwrites)
git df checkout <branch>
- Look at the next section to figure out which branch you should be using.
-
You're literally good to go
git df status
to see any updatesgit df add <file>
to add any new configs to the repogit df fetch
to see if there were any updates on the remotegit df pull
to pull in updatesgit df commit
+git df push
to add local updates to the remote
The master
branch is meant for use in it's own proper working repository to compare example files, handle merging from the other branches, etc.
Use the wsl
branch for use in Windows Subsystem for Linux environments. This enables both Linux and Windows configuration from one place.
Use the linux
branch for linux-only systems (bare metal installs, VM's, etc)
Use the windows
branch for windows-only systems (although I don't know why you would lol) Also check out the windows specific instructions
-
Customize / Review important dotfiles
- .gitconfig
- .vimrc
- .bashrc
- .dircolors
- .tmux.conf
- .profile?
- .profile (powershell)?
-
Documentation
- Create Repo Readme
- Installation/Usage steps
- Windows Documentation
-
Create one-liner for the git bare repo setup and cloning
-
Windows
- Script for setting Windows application configs
- Bare repo option for Windows installs as well?
- Curate a new software list for Windows installs
- Software install script using Chocolatey (or winget)
-
Linux
- Seperate linux-only branch
- Curate software list for Linux installs
- Software install script (diff package managers tho??)