technicalpickles / homesick

Your home directory is your castle. Don't leave your dotfiles behind.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

symlink on existing folders should not nuke untracked files

brettswift opened this issue · comments

This is important when you are adding dotfile control to a machine that hasn't had homesick on it before.

My example was adding support for .ssh keys. I ran homesick, and it asked me if I wanted to overwrite the .ssh folder, I said yes. I thought it would overwrite what was there, but it nuked the whole folder and only put there what was in the git repo.

Desired behaviour (if you would agree?)

  1. cache folders it needs to overwrite, in a temporary location.
  2. clone and nuke the folder
  3. copy the temporary folder back, skipping files that already exist.

This will give you the ability to do a homesick diff dotfiles and add in files that existed before the clone.

Like that idea?

👍 Seems pretty useful.

+1 agreed too. Anyone have time to work on this?

I have a similar problem. Running homesick symlink CASTLE and answering yes to a tracked file in a directory will destroy the content of the existing directories. Very dangerous.