For example, `git remote -v` would show: `secure-s3 /mnt/fuse/rclone/secure-s3/git/$REPO.git`
I think concurrency is a problem with file-based remotes but for one person keeping a desktop and laptop in sync it is much simpler than running a VPS.
btw, Git also supports the HTTP protocol ...
Also handy if you're running an agent in a container on the local fs. Set up a local clone, contain the agent to that repo folder and have it hack away on that. Later, you step out of the container and do the syncing. You can't use worktrees in this situations.
Bare repos are also pretty cool. You can clone the git mailing list as a bare repo and search for threads there instead of setting up an mbox (same for the kernel obviously)
Check it out from '/tmp' and make sure it still builds.
For a single-dev or small team, it beats having to do github runner epicycles to accomplish the same basic goal. Add in Firejail if you want environment isolation.
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.
And I recon this is the default workflow for most people most of the time.
Aside from that unique use case, I might consider this for storing code on a network attached drive (archival).
Putting the generic term into your corporation's name can be effective means of claiming things that don't belong to you.
Jon Postel reserved 44.0.0.0/8 for a generic purpose: "amateur radio digital communications." Decades later, there was a successful heist when some enterprising individuals who had incorporated "Amateur Radio Digital Communications" misrepresented to ARIN that the assignment had actually been theirs. Immediately after ARIN gave them transfer rights, they pocketed 8 figures reselling the space to Amazon.
Github obviously isn't making explicit claims like this but they benefit whenever people with purchasing power implicitly understand that github is the only option.
edited: Amateur Radio Digital Communications is not an LLC
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.
I have lots of projects under for version control with no remotes.
The head of ARIN defends[1] the transfer throughout the thread.
[0]: https://seclists.org/nanog/2019/Jul/366 [1]: https://seclists.org/nanog/2019/Jul/458
As part of working on cani I was also using a variety of git remotes. One of the remotes was hosted on a server I have at home. Here’s how I set that up.
Let’s say the server has a project in a folder called cani. This folder has the code and a .git/ directory:
/home/user/projects/cani
We can use the above folder to clone a bare repository (can be used as a remote without causing weird conflicts):
cd /home/user/bares
git clone --bare /home/user/projects/cani
# creates /home/user/bares/cani.git
To add this bare repository as a remote to push & pull from can look like a few different ways. Here’s the remote while on the same machine:
git remote add local /home/user/bares/cani.git
Here’s how you can set up the remote when pushing from another machine:
git remote add local ssh://USER@MACHINE:/home/user/bares/cani.git
We can associate the branch main as the default branch for remote local:
git remote set-branches local main
Now we’re ready to push to our local remote!
# without any config
git push ssh://USER@MACHINE:/home/user/bares/cani.git
# if remote configured with ssh://USER@ as above
git push local
Pulling from the configured remote:
# without default branch
git pull local main
# with default branch branch `main`
git pull local
For what it’s worth, the ssh://USER@MACHINE syntax can be replaced with any ssh config you might have set up locally.
Anyway! I really liked working with a local remote, especially when working with offsite remotes with lower uptime. Setting up a local remote made it a much more relaxing to use a remote that is maybe not always available. In my own case, the offsite remote is a small community server that is getting massively hammered by big corporate scrapers. Now I have the best of both: a local remote I can push to with no delay and an offsite copy hosted by a friend in an online community. Notably, no big tech is involved!