The branches are generally organized around features, not individuals: what if an individual is leaving: what are you supposed to do with his or her branch?
As opposed to a feature branch, which represents a goal to implement.
Several people can collaborate to a common branch, rebasing their local commits on top of the updated fetched feature branch, and then pushing their commits: any conflicts is resolved locally first (during the rebase).
Now X is also working on branch A, now he gets the pull request on A done by Y.
X does not get pull request.
what X done is a simple git pull
. If git is properly configured (meaning pull.rebase
and rebase.autostash
are set globally), that git pull
triggers a rebase of any local commits on branch A
on top of the fetched updated origin/A
.
So what should X do now assuming there is no conflict?
A git push
, to push his/her own commits to the remote repo, in branch A
.
And after X
does his part, does Y
gets any pull request for the rebase?
No. Y will pull in his/her own time that same branch.
The general idea is: when working collaboratively on a common branch, pull first (and resolve any conflict locally), then push when ready.