• Github has a CLI tool. Right now mine is behaving weirdly but I still wanted to check out a PR so I made this zsh function:

    function gh_get_pr() {
      PRID=$1
      git fetch origin pull/$PRID/head:PR_$PRID && git switch PR_$PRID
    }
  • If you select "allow edits by maintainers" on a Github PR it will give the maintainers access to your forked repo while still claiming 0 collaborators have access to this repository. Only you can contribute to this repository.

  • You can use git from the command line with multiple github identities…probably. I was hoping I could simply write down how to do this but I got thoroughly confused so I will now write down a bunch of things and then delete them again when I am done investigating. :)

    I've created a new dummy account and dummy repo and I checked it out with HTTPS and tried pushing to it without setting anything up. I get asked for my username and then for a password but you need a PAT for that. If you create a PAT it works. And if you clone the repo with SSH you cannot push to it even if you already have commits in the repo. So the question is, why does this work on my other repo?

    I don't seem to have any key for it in .ssh. Alright, as an alternative, I'm adding a key to the first testuser and then I will try if I can also push to the other repo from that. I have so far created a key but not added it and I cannot push to the first test repo. I couldn't make it work at first but with -F /dev/null and -o IdentitiesOnly=yes it eventually did. So some kind of agent is interfering here. ssh-add -l lists two keys but neither of those is for the other account. I'm pretty sure the repo must allow pushing by other users but why?