Remix.run Logo
mystifyingpoi 2 hours ago

What's the purpose of this? I don't get it. Why push at all to "local remote", if you can just keep your changes on a local branch, and push it whenever "remote remote" becomes available again?

pokstad an hour ago | parent | next [-]

I use this to push changes to a local encrypted sparse bundle image, and then I periodically rsync that image to a remote disk. Git has no built in encrypted storage, so pushing directly to a remote means you trust that remote.

m463 21 minutes ago | parent | prev | next [-]

I've used it to quickly start a git project, with source control, no credentials to deal with, etc

eventually I can set up a proper git repo, set up credentials, etc.

I think it's like how some people use 127.0.0.1 for stuff, then later expand the software engineering process to do it right.

adastra22 17 minutes ago | parent [-]

I don’t understand. A proper git repo is… your git repo. Git is distributed.

I have lots of projects under for version control with no remotes.

tonypapousek 26 minutes ago | parent | prev | next [-]

I reckon most folks have made a git oopsie and needed to re-clone a repo at least once in their career.

Having a “local remote” would be an awfully quick way to do that, especially in situations with no/low network connection or a flakey upstream server.

bregma 22 minutes ago | parent [-]

> I reckon most folks have made a git oopsie and needed to re-clone a repo at least once in their career.

And I recon this is the default workflow for most people most of the time.

adregan an hour ago | parent | prev | next [-]

A decade ago I was working with an intern who wasn’t allowed access to push to any branch. As I wanted him to get experience with the development cycle, I set up a bare repo in a shared Dropbox folder and had him push code there.

Aside from that unique use case, I might consider this for storing code on a network attached drive (archival).

ulrikrasmussen an hour ago | parent | prev | next [-]

I am also seriously puzzled and don't see the point. Why push to a local remote if the real remote is not reachable? The branch is still not leaving your machine, you are just making a copy of it in another place and now have to manage `local/` refs in addition to `origin/`.

fwip an hour ago | parent [-]

"local" can also be a network fileshare. It could also be in a directory that is treated differently than your other checkouts - whether that's something like deployment, sharing over the web, running CI, etc.

ulrikrasmussen a few seconds ago | parent [-]

I doubt it is safe to concurrently modify a git repo over a fileshare though. I don't understand the other use cases you mention

an hour ago | parent | prev | next [-]
[deleted]
dist-epoch an hour ago | parent | prev | next [-]

I use this to work with multiple agents in multiple sandboxes - they push to the local remote instead of GitHub which is now unreliable.

And I push to GitHub/GitLab from a repo outside the sandboxes.

an hour ago | parent | prev | next [-]
[deleted]
XorNot 20 minutes ago | parent | prev [-]

Within certain bounds git behaves quite nicely with a directory of bare git repos and Syncthing.