managing-work-dotfiles
π―Skillfrom tdhopper/dotfiles2.0
Manages work-specific dotfiles at Spotify using yadm-work, enabling isolated tracking, synchronization, and configuration of work-related configuration files.
Installation
npx skills add https://github.com/tdhopper/dotfiles2.0 --skill managing-work-dotfilesSkill Details
Use this skill when working with work-specific dotfiles managed by yadm-work. This includes pulling remote changes, committing and pushing work dotfile changes, modifying work configuration files, viewing tracked work files, resolving merge conflicts, and maintaining the work dotfiles repository at Spotify GHE. Triggers on "work dotfiles", "yadm-work", "spotify dotfiles", or work-related config management.
Overview
# Managing Work Dotfiles
This skill manages work-specific dotfiles using a separate git bare repo, keeping them isolated from personal dotfiles.
Repository Info
- Remote:
git@ghe.spotify.net:thopper/dotfiles.git - Work tree:
$HOME - Git directory:
~/.local/share/yadm-work/repo.git - Function:
yadm-work(defined in~/.config/fish/fish-work.fish)
Key Principle: Use yadm-work
The yadm-work function wraps git with the correct directories:
```bash
yadm-work status
yadm-work add
yadm-work commit -m "message"
yadm-work push
```
This is equivalent to:
```bash
git --git-dir="$HOME/.local/share/yadm-work/repo.git" --work-tree="$HOME"
```
Initial Setup
If not yet initialized on a new machine:
```bash
# Create the directory
mkdir -p ~/.local/share/yadm-work
# Clone as bare repo
git clone --bare git@ghe.spotify.net:thopper/dotfiles.git ~/.local/share/yadm-work/repo.git
# Checkout files to home directory
yadm-work checkout
```
Getting Current State
```bash
yadm-work status # Show modified/staged files
yadm-work ls-files # List all tracked work files
yadm-work diff # Show unstaged changes
yadm-work remote -v # Verify remote is Spotify GHE
```
Core Operations
Pull from Remote
```bash
yadm-work pull
```
If merge conflicts occur:
- Run
yadm-work statusto see conflicted files - Edit files to resolve conflicts
- Stage resolved files:
yadm-work add - Complete the merge:
yadm-work commit
Commit and Push Changes
```bash
yadm-work add
yadm-work add -u # Stage all modified tracked files
yadm-work commit -m "message" # Commit with message
yadm-work push # Push to Spotify GHE
```
Modify Configuration Files
- Find the relevant file:
yadm-work ls-files | grep -i - Read and understand the current config
- Make the requested changes
- Stage, commit, and push:
```bash
yadm-work add
yadm-work commit -m "Update
yadm-work push
```
Adding/Removing Files
Add a new file to tracking
```bash
yadm-work add
yadm-work commit -m "Add
yadm-work push
```
Important: When adding new files under ~/.claude/, also update ~/.claude/README.md to document them:
```bash
# After adding new .claude files, update the README
yadm-work add ~/.claude/README.md
yadm-work commit -m "Update README with new
yadm-work push
```
Stop tracking a file (without deleting it)
```bash
yadm-work rm --cached
yadm-work commit -m "Stop tracking
yadm-work push
```
Avoiding Conflicts with Personal Dotfiles
Critical: Never track the same file in both personal (yadm) and work (yadm-work) repos.
Check before adding:
```bash
# Check if file is in personal dotfiles
yadm ls-files | grep
# Check if file is in work dotfiles
yadm-work ls-files | grep
```
Currently Tracked Files
```
~/.claude/README.md
~/.claude/skills/add-knowledge/
~/.claude/skills/investigating-pagerduty-incidents/
~/.claude/skills/managing-work-dotfiles/
~/.claude/skills/monitor-deploy/
```
Useful Commands
```bash
yadm-work log --oneline -10 # Recent commits
yadm-work show HEAD # Last commit details
yadm-work stash # Stash changes temporarily
yadm-work stash pop # Restore stashed changes
```
More from this repository2
I apologize, but I cannot confidently infer the specific functionality of the "monitoring-deployments" skill from the provided README, which only mentions using yadm for dotfile management. Without...
Captures and organizes work-related notes and learnings into Tim's Spotify knowledge base repository.