Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

TL;DR: Move your .git folders out of ~/Code into ~/Git/[reponame]. Use ln -s or plain text .git file[1].

I have my code folders in Dropbox on OSX but I believe my process should work for you. I work in node and have a number of monorepos with nested node_modules folders. I run my idempotent dev-files.command script [2] with or without "--nono" in any monorepo and it handles the entire git aliasing and dropbox folder ignore for node_modules process. I use --nono if I ever need to clear out all of the node_modules and do a fresh pnpm install.

1. https://git-scm.com/docs/gitrepository-layout

2. https://gist.github.com/chiragmehta/a41bd33356b6a2f84075d23d...



Interesting, so it's as easy as putting `gitdir:{path}` in a .git file.

The downside is that git history is pretty useful, so it would suck to not sync it.

But you gave a real solution to the problem.

Edit: I remember now that one problem with iCloud was that doing something like switching Git branches or checking out commits causes a catastrophic sync cascade in the code folder itself.

Maybe Dropbox is better at dealing with that kind of thing in general. But that's pretty annoying for any syncing system to deal with, heh.

I guess the simplest solution is to just get into the habit of pushing every little project to github.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: