`rsync_remote.gsub!('GIT_BRANCH', git_branch)` will do here, since we don't need any special regex powers.