Say I want to do this:
git checkout featureBranch git rebase master
If I want to combine two shell commands that I can do:
git checkout featureBranch && git rebase master
However, this is not atomic. If for some reason the git checkout command does not work, the working directory will not be in the same state as before, or in the final expected state. In addition, other processes, such as my IDE, may see an intermediate state between the two teams.
Does git provide a way to combine two actions atomically?
I do not need file system level atomicity. That is, if the combined action requires changing 10 files in the working directory, it is normal if other processes can observe these 10 changes individually.
Edit: The above two commands are for illustration purposes only. In addition, it may be 3 or more teams that need to be bound.
source share