How do the two local folders of Git correspond to two branches of a repo on Github?

the situation is that my local folders An and B are two versions of the same project. What should I do if I want to store them in two branches of the same repo on Github? There are already two branches on the
Github.

May.18,2022

Associate different folders with remote branches respectively.
branchname refers to the name of the remote branch

git remote add <branchname> https://github.com/user/repo.git
Menu