Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 22, 2026

The .copilot folder was undocumented and bootstrap.sh contained symlink creation code incompatible with the bare repository pattern.

Changes

  • Documentation: Added .copilot/ to Repository Structure in copilot-instructions.md
  • Bug fix: Removed symlink creation loop (lines 191-205) from bootstrap.sh

Technical Details

The script clones dotfiles as a bare repository to $HOME/.dotfiles with work-tree set to $HOME:

git clone --bare https://github.com/johnmog/dotfiles "$HOME/.dotfiles"
dotfiles checkout -f  # Checks out directly to $HOME

The removed code attempted to create symlinks like:

ln -sf "$HOME/.dotfiles/.copilot" "$HOME/.copilot"

This fails because bare repositories don't contain working files at .dotfiles/.copilot - only git objects. Files are already checked out to $HOME by the checkout -f command, making symlinks both broken and unnecessary.

The dotfiles alias (git --git-dir=$HOME/.dotfiles --work-tree=$HOME) now correctly tracks changes in all directories including .copilot.

Original prompt
  1. Update copilot-instructions.md to document the .copilot folder in the appropriate place.
  2. Ensure the .copilot functionality is correct (e.g. dotfiles status will correctly detect changes under .copilot and the symlink ensures files are kept in sync with the repo and deployed correctly with bootstrap.sh

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits January 22, 2026 14:02
Remove unnecessary symlink loop (lines 191-202) and explicit symlink
creation (lines 204-205). In a bare repository setup, files are checked
out directly to $HOME by 'dotfiles checkout -f', so symlinks are not
needed and the previous code was attempting to link from non-existent
paths in the bare repo directory.

Co-authored-by: johnmog <[email protected]>
Follow project security practices by properly quoting variable to
handle edge cases where HOME contains special characters.

Co-authored-by: johnmog <[email protected]>
Copilot AI requested a review from johnmog January 22, 2026 14:06
Copilot AI changed the title [WIP] Update documentation for .copilot folder usage Document .copilot folder and remove broken symlink logic from bootstrap.sh Jan 22, 2026
@johnmog johnmog closed this Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants