Sharing content from thesis online, before submitting thesis
Ethically, I think you would also be fine. Theses in many fields include content from published papers; GitHub doesn't even count as 'published'.

Practically, it depends on how much blind faith your department places in the plagiarism checker.  Plagiarism detectors should only be used as a first-pass, and humans should evaluate the detected potential plagiarism. If the authorship of your GitHub documentation is clearly labeled, then they will hopefully see that it is your work.

Navigating the details of this in a department-specific setting is what your adviser is there to help you do.  If they've given their blessing, and they are aware of the policy, and they are a good adviser, then I would also expect them to be willing to go to bat for you if it does come up in thesis review.