Bundler has logic to release gems to rubygems. This includes tagging the current sha with the correct version before pushing up to rubygems. It keeps it very simple and doesn't manipulate the local git repo except to create the tag. It only manipulates the remote git repo by pushing the local changes (including tags). Fetching/rebasing/checking out branches, etc are manipulating the local repo.