I will mainly talk about the practical consequences and not go into the nitty gritty. By GPL compatible I mean that a GPL project can use your code (NOT you can use GPL code).
The MIT and BSD 2 clause licenses have similar requirements: keep the license file. The BSD 3 clause license adds a term to the BSD 2 that prevents someone from claiming false ...
You are writing code to be distributed as part of a set of teaching materials, and you have incorporated within it some third-party code licensed to you under Apache2.
The use of the third-party code makes your program a derivative work of the Apache2 code. Section 4 of the Apache2 licence says you may do this, and places the following conditions on such ...
The requirements of the GPL are fairly simple:
Any modifications, enhancements or additional modules must be licensed under the GPL (and use only code under a GPL-compatible license).
Anyone who receives a copy of the application code has the right to receive the source code. This source code will be distributed under the terms and conditions of the GPL ...
The license says verbatim:
The GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.
It means that if you make a derivative program, you shall make explicit that it's a different one.
Not that any change within the same program shall be tracked. That was most ...
There is no schematic rule which fits all. Do something which fulfills the license terms and fits the way you distribute your project.
E.g. the MIT license requires
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
The GPL suggests
If the program does terminal interaction, make ...
Consider to use separate permissive license for code snippets.
This allows to copy & incorporate your code into others.
I wouldn't put attributon requerment for the code, it adds only headache of mentoning your name, usually tutorials are trivial to bother.
On other hand text and other creative material might require attributon, etc.
You must comply with the licenses of all the software that you distribute.
Must I include the license statement of every library in the bundle?
Yes, if that is required by a license in your bundle. Most open source licenses including MIT, LGPL, GPL require this.
Would it be sufficient to only have the license files in the public repo?
No, most licenses ...