Replies: 1 comment 1 reply
-
This doesn't directly answer your question, but: I used to do this with my dotfiles. I was never fully satisfied with this setup but it was good enough. I tried switching to jj but nothing felt quite right. I decided to instead use Chezmoi and I'm happier with it than I was before. It's cross-platform and has solutions for handling different config on different machines. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Recently discovered
jj
and really enjoyed it as I followed through the tutorial, so I thought I would give it a slightly more "real world" try on my dotfiles. Unfortunately, I've hit a little snag. I usegit --git-dir=$HOME/.dotfiles/ --work-tree=$HOME
, so I can clone my repo on a new machine and everything gets put into the proper config directory without any need to move things around. Is there a way to emulate this behavior withjj
, preferably with a colocated git repo?Best I've come up with so far is maybe something with a separate workspace in each required config directory, but I'm assuming this won't automatically happen when initializing on an existing git repo. I am not finding much documentation on how the jj workspaces interact with remote repositories. Are workspaces something that can be pushed to a remote, or are they more of a local only phenomenon?
Edit: I had a bit of inspiration toward re-creating this setup without workspaces, you can use gitignore! Something like this:
The first line of the two "config folder" sections un-ignores the folder itself, the second un-ignores the contents of that folder.
This gets me 95% of the way there. I would have a .jj in my home repo instead of the slightly more descriptive .dotfiles (which doesn't actually contain any dotfiles) and I would have to move the README from said folder into the .config (which is probably more logical, just might not play as well with github).
Beta Was this translation helpful? Give feedback.
All reactions