I'm maintaining 4 branches of a project on Git with a structure as below.
Sounds like your branches depend on each other and this is causing you problems. Branch depencencies can be caused by the branches getting bigger and bigger and containing too much stuff.
This means that you could benefit from merging smaller things earlier! However looks like you don't want to merge
student to master before either is "complete".
Sounds like you need a place where you can merge the work that is done but might not be ready for a release yet.
If you're considering
master to be a branch where only finished features go, maybe you need another branch called
develop that is allowed to have not whole features, but smaller steps merged in?
Then you could do something like:
teacher, merge them to
student-related features, merge them to develop too
developlooks like something you could release
masterand add a tag a new release
This means that whatever system improvements you do during work on
teacher, they will be also quickly available for you during work on
student. Same applies to other functionality like authentication.
Don't let your feature branches stay unmerged for more than a few days.
Unmerged work is waste!
More reading: A successful Git branching model