TheLocehiliosan / yadm

Yet Another Dotfiles Manager
https://yadm.io/
GNU General Public License v3.0
4.94k stars 178 forks source link

Question: for dummies #353

Closed ursbraem closed 2 years ago

ursbraem commented 3 years ago

Hi

this is about my third attempt to start using yadm. I want to very much, but still don't understand what it does though, so I was nearly about to give up again.

What I expected it to do:

What I think I understand it does:

Is that correct?

What is the reason the repo is bare (if I got that right) and isn't in a custom location? Is it possible to see yadm commits / files locally in a git client like tower?

That's about it. Writing the questions already helped me understand a little better.. but I'd still be happy about a dummy-proof explanation on how this works.

Thanks!

TheLocehiliosan commented 3 years ago

yadm does not simply symlink files. It is, in essence, a wrapper around Git. The Git repo is located in ~/.local/share/yadm/repo.git and the Git worktree is usually $HOME.

To compare, normally when you clone a Git repo into directory X, X is the worktree (where the files are kept) and X/.git is the repository (where the repo history is kept).

It might help to think of yadm as making your $HOME be a cloned repo, and it uses some "magic" to use ~/.local/share/yadm/repo.git instead $HOME/.git.

As for using another tool, that might be possible if the tool supports the environment GIT_DIR & GIT_WORK_TREE, you can try running "yadm enter " or "yadm enter", and then running your tool from within that shell. Or if it doesn't support those environment variables, it might be possible to inform the tool of the repo and worktree via another configuration. Sorry, I'm not familiar with Git Tower at all.

Hopefully this helps. If it's still confusing, I'll try to explain in another way.

ursbraem commented 3 years ago

It might help to think of yadm as making your $HOME be a cloned repo, and it uses some "magic" to use ~/.local/share/yadm/repo.git instead $HOME/.git.

Yes, that helps!! Thanks!