> Again, distribution has to do with a transfer of ownership
You're mixing sub-threads here, but you're still confused. Distribution is a transfer of ownership of a copy, it does not grant copyrights or ownership of the work. You can buy a book that was distributed, and that does not give you the right to make copies of the book.
> Github can show your code to others but it cannot give (as in ownership) your code to them.
In the digital world, showing is "distributing", and copyright law is clear about this.
You should perhaps read the definitions that are in the copyright law itself, and try to understand them:
"“Publication” is the distribution of copies or phonorecords of a work to the
public by sale or other transfer of ownership, or by rental, lease, or lending. The
offering to distribute copies or phonorecords to a group of persons for purposes
of further distribution, public performance, or public display, constitutes publication. A public performance or display of a work does not of itself constitute
publication.
To perform or display a work “publicly” means—
(1) to perform or display it at a place open to the public or at any place
where a substantial number of persons outside of a normal circle of a family
and its social acquaintances is gathered; or
(2) to transmit or otherwise communicate a performance or display of the
work to a place specified by clause (1) or to the public, by means of any device
or process, whether the members of the public capable of receiving the performance or display receive it in the same place or in separate places and at the
same time or at different times.
https://www.copyright.gov/title17/title17.pdf