From c8872ca246387f5dc8314cfdd661657922249b48 Mon Sep 17 00:00:00 2001 From: Jelani Woods Date: Thu, 1 Apr 2021 21:31:46 -0500 Subject: [PATCH] Push to any branch --- Gemfile.lock | 2 +- lib/web_git.rb | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 3cee973..d113fd2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -24,7 +24,7 @@ GEM erubi (1.8.0) faraday (0.15.4) multipart-post (>= 1.2, < 3) - git (1.7.0) + git (1.8.1) rchardet (~> 1.8) github_api (0.18.2) addressable (~> 2.4) diff --git a/lib/web_git.rb b/lib/web_git.rb index 0428d84..ccebc15 100644 --- a/lib/web_git.rb +++ b/lib/web_git.rb @@ -131,12 +131,8 @@ class Server < Sinatra::Base working_dir = File.exist?(Dir.pwd + "/.git") ? Dir.pwd : Dir.pwd + "/.." g = Git.open(working_dir) # TODO push to heroku eventually, multiple remotes - # remote = params[:remote] - # unless remote.nil? - # remote = g.remote remote - # g.push remote - # end - g.push + + g.push('origin', g.current_branch) redirect to("/") end