I did a little digging and found this post:
Register prior art, but not wanting a patentRegister prior art, but not wanting a patent
In case it might help anyone else, I'll answer my own questions for archival reasons. If I got anything wrong, any help correcting would be much appreciated.
- Yes, GitHub can be used as a published prior art.
- If I wrote the code on GitHub, and I was the first that invented it, no one else but me can file the patent. However, I only have 1 year from the publish date to file that patent. After that year passes, no one can file the patent (I assume its under public domain?)
- From the URL I linked, it seems like the GitHub page must be publicly available for it to be considered a published prior art. I'm not sure on the specifics if the repository was initially private, then set to public, then set to private again some time later, then public again. I assume the publish date of the prior art is on the first time it was set to public (so the 1 year grace period would start ticking on that time).