#!/bin/sh
# Re-link dotfiles after switching branches ($3 is 1 for branch checkouts, 0 for file checkouts)
[ "$3" = 1 ] || exit 0
repo="$(git rev-parse --show-toplevel)"
stow -d "$repo" -t "$HOME" --restow dotfiles || echo "stow hit conflicts; fix them and run: stow -R dotfiles" >&2
