DEV Community

Discussion on: Dotfile management on MacOS with Git

Collapse
 
jonlauridsen profile image
Jon Lauridsen

Nice article, thanks, I'll give this a try. I think it'll also allow capturing both my work and home setup by using two different branches, so I don't pull in Kubernetes configuration files etc. to my home setup.

You don't explicitly mention how to link up the bare repo to a remote repo, and I just wanted to confirm to anyone who might be reading this wondering about that step that it's just the normal remote-adding workflow:

config branch -M main
config remote add origin git@github.com:<user>/<repo>.git
config push -u origin main
Enter fullscreen mode Exit fullscreen mode

Of very minor note it sounds like it's common to direct --bare repos into folders suffixed .git (reading e.g. this article), so I called mine .cfg.git. Not that it makes a technical difference either way, I just think it'll be a small reminder for my future self to remember what the folder is for.

Collapse
 
deusmxsabrina profile image
Sabrina

Thank you, super happy to hear it might be useful and I really appreciate the addition about the bare repo set up. I'll edit the article when I have a bit more time (with credit!) but wanted to make sure I said thanks now!

I have used this set up on different branches.

I appreciate the note on naming too; that makes sense and I think in hindsight I should have named mine something similar.