andsens / homeshick

git dotfiles synchronizer written in bash

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"shallow symlinking" not working

tomhoover opened this issue · comments

I'm attempting to use shallow symlinking (as described at https://github.com/andsens/homeshick/wiki/Symlinking#shallow-symlinking), but have been unsuccessful. I've created a directory named local as a peer to home and created a symlink from home/.local to ../local; however, executing homeshick link fails to create a .local symlink in $HOME.

The following is my dotfiles-castle directory structure (I've cleaned up the tree output by deleting the .git directory):

$ tree -a dotfiles-castle/

dotfiles-castle/
├── home
│   ├── .bash_profile
│   ├── .bashrc
│   ├── .local -> ../local
│   └── .profile
└── local
    └── Darwin.bash_profile

but have been unsuccessful

You'll have to be a little more specific :-)
However, I think I know what your problem is: Remember to add the files to git, homeshick only links files tracked by git - I totally forgot to mention that change in the docs, just gotta figure out where to do it.

Regardless, the following definitely works when using test/interactive:

homeshick generate test
homeshick cd test
mkdir local
touch local/Darwin.bash_profile
ln -s ../local home/.local
git add .
git commit -m 'add .local'
homeshick link test

That was it. I only installed homeshick today, and have been trying to decide whether to make it my dotfile manager of choice--since I hadn't yet decided, I hadn't bother committing anything to git. Thanks!

I'm glad I could help, and I hope you'll go with homeshick.

I've update the docs. The thing about only linking git-tracked files is now mentioned in two separate places, I hope that prevents any confusion in the future.