Working in a large team as FE developer we frequently are doing work while the BE is also working. (2 or more branches actively working). Sometimes we are even working off of an alternate master/feature branch. (which can be 3 or more branches sometimes)
So we tend to have to merge other peoples branches into our current branch in order to develop our work in parallel but then we have to create another branch after that in order to strip out only our code for the PR.
I’ve been looking for the best way to handle this but haven’t found a really prime method.
My current practice is on my branch (all of my work stashed or commited) I
git pull --squash remote/branch the other branch. do my work and commit single files (very rarely the same files from the squashed remote branch).
For updates to remote branch, I commit my work or stash all work in progress, merge new work.
git stash apply resolve conflicts and develop.
Pushing my PR, commit only my work (thank you for
git add -i) stash remote branch work and PR from there…
The ability to commit/merge/include a branch(remote or local) that actually never gets commited. Would need to allow you to update it, or just create another hidden commit.