diff --git a/Library/Homebrew/dev-cmd/bump-formula-pr.rb b/Library/Homebrew/dev-cmd/bump-formula-pr.rb index d875e42ace..8c232e182c 100644 --- a/Library/Homebrew/dev-cmd/bump-formula-pr.rb +++ b/Library/Homebrew/dev-cmd/bump-formula-pr.rb @@ -147,6 +147,7 @@ module Homebrew ohai "hub fork (to read $HUB_REMOTE)" ohai "git push $HUB_REMOTE #{branch}:#{branch}" ohai "hub pull-request --browse -m '#{formula.name} #{new_formula_version}#{devel_message}'" + ohai "git checkout -" else safe_system "git", "checkout", "-b", branch, "origin/master" safe_system "git", "commit", "--no-edit", "--verbose", @@ -159,6 +160,7 @@ module Homebrew safe_system "git", "push", remote, "#{branch}:#{branch}" safe_system "hub", "pull-request", "--browse", "-m", "#{formula.name} #{new_formula_version}#{devel_message}\n\nCreated with `brew bump-formula-pr`." + safe_system "git", "checkout", "-" end end end