Installation of GitHub Released Version(s)
Download the .tds.zip file from the bottom of the relevant release page page, and then unzip all of its contents, making sure to merge the folders, into a texmf directory, preferrably your local one. Use $TEXMFHOME to find that out, or, if MikTeX is used, see Create a local texmf tree in MiKTeX -- you can create on just for messing w/ pgfplots, and make sure that it takes precedence over the default TeXmf trees.
By unzipping and merging the folders, I mean that:
- Do not have a ``top-level'' folder after you unzip.
- For existing directories, just put new files into them.
Installing the Version from the Main Branch
- Download the soucre code.
- Remove .gitignore, .github (might be hidden), README.md, and then zip the result (do not zip the top-level folder).
- Follow the same instructions as a released version.
Non-Answer to First Part
I've sent the maintainer of pgfplots an email using the address listed on the package manual on CTAN, but has gotten no response yet even after 8 (sorry for typo in comment) days. The email is reproduced verbatim below:
Dear Dr. Feuersänger,
Thank you for the awesome pgfplots package for LaTeX. Is there any
plan to continue its maintenance, having no commits for 7 months and
no releases for a few years? CTAN vs GitHub releases have different
versions with CTAN being newer, did you simply forget to publish a
release on GitHub or was it for some intentional reason?
Thank you for addressing my questions.
Best regards,
John (a TeX user)
Therefore, I doubt if the first part of the problem could be solved at all... the best plan is probably just to use old APIs and use the compat option of \pgfplotsset, then hope there's no bugs, and if there's any, patch them manually in a way that still works if the bug is fixed.
=========
UPDATE
Canoncial Answer
I've sent an email to the maintainer of pgfplots (the one listed on CTAN and also with an email address in the documentation), and got the following response:
Hi John,
thanks for your interest. Unfortunately, I cannot continue the
development of pgfplots anymore. The Github versions are not
maintained by me, they are from someone else who migrated the
repository from sourceforge to github.
Kind regards
Christian
Therefore, pgfplots seem to be unmaintained as of today, at least not officially. The GitHub version is non-official.
pgfplotscan really give a 'canonical' answer to the first part of the question. for the second, there really isn't a 'canonical' answer. it should be installed into atexmftree which is not the distributed one. that could be the local tree, the home tree or some other tree. which to use depends on how you install tex live, how you want to use it and, to some extent, personal preference.