You can follow either of these ways you mentioned . Each time change workspace mapping to point to correct branch, which will give you all the latest code from that branch , once you are done with changes check in those changes.
You can maintain local repositires pointing to each branch with each having their own workspace pointing to respective branch . In this case if you are changing any object you are still changing in your packages local directory folder and you have to manually copy that object to respective folder in their repository folder , in that way when you go to see pending changes you can switch your workspace and check in those changes in a branch where workspace is pointing to .
Regarding build , its generated out of your main branch so unless your are not sure your changes from different branch are not yet ready to release in main branch , don't merge those changes in Main . You may need separate environment (another dev box ) to test these changes in different branch as build is generated out of Main branch .