Skip to content

Instantly share code, notes, and snippets.

@geertj
Created September 7, 2016 20:40
Show Gist options
  • Save geertj/8d62d79012a24141a5f22d6ccf450681 to your computer and use it in GitHub Desktop.
Save geertj/8d62d79012a24141a5f22d6ccf450681 to your computer and use it in GitHub Desktop.
diff --git a/scripts/vmbuild.rb b/scripts/vmbuild.rb
index f472e74..906b4d9 100644
--- a/scripts/vmbuild.rb
+++ b/scripts/vmbuild.rb
@@ -55,9 +55,8 @@ if !cli_options[:local] && cli_options[:build_url]
$log.info("Checking out reference #{cli_options[:build_ref]} from repo #{build_repo} ...")
`git reset --hard` # Drop any local changes
`git clean -dxf` # Clean up any local untracked changes
- `git checkout #{cli_options[:build_ref]}` # Checkout existing branch
`git fetch origin` # Get origin updates
- `git reset --hard origin/#{cli_options[:build_ref]}` # Reset the branch to the origin
+ `git checkout #{cli_options[:build_ref]}` # Checkout existing branch
end
unless File.exist?(cfg_base)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment