points by seba_dos1 7 months ago

Just make the repository on the server side bare and you won't have to worry about checked out branches or renaming ".git" directory.

cl3misch 7 months ago

> This is a great way to [...] work on server-side files without laggy typing or manual copying

This is the usecase mentioned in the article and it wouldn't work with a bare repo. But if the server your SSH'ing to is just a central point to sync code across machines, then you're right: multiple hoops mentioned in the article are solved by having the central repo bare.

  • liveoneggs 7 months ago

    yeah it seems odd that they don't just have remote> $HOME/repos/foo.git and then clone from there locally and remotely

    • seba_dos1 7 months ago

      FWIW a single user working on a remote versioned directory is indeed a reasonable use-case for receive.denyCurrentBranch=updateInstead, but IMO the article should have made it clear that it's not necessarily a good choice in general.