this is a robotics team with some questions.
Here's our current setup, using GitLab: Currently, we have a main branch as well as a separate branch for each of our programmers. When they want to start working, they pull main and merge local main into their local personal branch (personal meaning the branch that has their name on it). From there they make the changes they want to, push that up, and initiate an MR. The lead programmer approves the MR and merges it in to main.
Here's a what if scenario that causes issues for us (fake names): Fred starts working, updating his personal to be up-to-date with main. So, he starts from commit A. He's made changes as commits 1 and 2 on his personal branch (A-1-2), when Bob makes an important, time-sensitive fix and it gets merged into main right away, as commit B (A-B). How does Fred update his personal branch to include B in a way that doesn't cause issues down the line when his branch gets merged into main?
Currently, the idea is rebase main onto personal, which if I understand correctly would make A-B-1-2. However, in our experience this causes issues with pushing to the remote personal itself.
My big question is: Should our branches be set up differently? For example, branches get created for individual features and then deleted, instead of keeping personal branches around and constantly updating them. Would this solve our problems, or at least some of them? Should we not have remote personals, and should we then be using git rebase?