Is git push with several commits an atomic operation?
- with regards to other
git pushoperations to the same branch - with regards to
git pulloperations from the same branch
For case 1. it has to be. Otherwise my commits would interfere with someone else's commits, possibly creating an inconsistent or invalid state. Git prevents that by either forcing me to integrate someone else's changes first (if I lose the race) or forcing someone else to integrate my changes (if I win the race).
But what about 2.? If my repository looks like this:
C---D---E master
/
A---B origin/master
Is anyone doing a git pull while I am doing git push going to see either A---B or A---B---C---D---E, or can they also get anything in between, e.g. A---B---C---D?