Skip to content

Instantly share code, notes, and snippets.

@Voker57
Created May 27, 2013 09:02
Show Gist options
  • Save Voker57/5655971 to your computer and use it in GitHub Desktop.
Save Voker57/5655971 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
# git-put host:path
dash_u = ARGV.include? '-u'
ARGV.delete '-u'
host = ARGV[0].split(":")[0]
path = ARGV[0].split(":")[1..-1].join(":")
`ssh #{host} 'git init --bare #{path}'`
`git push #{ARGV[0]} \`git branch\``
if dash_u
`git remote add origin #{ARGV[0]}`
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment