public
Created

Script for git repo backup in dropbox via git bundle

  • Download Gist
git-backup
Ruby
1 2 3 4 5 6 7 8
#!/usr/bin/env ruby
if __FILE__ == $0
bundle_name = ARGV[0] if (ARGV[0])
bundle_name = `pwd`.split('/').last.chomp if bundle_name.nil?
bundle_name += ".git.bundle"
puts "Backing up to bundle #{bundle_name}"
`git bundle create ~/Dropbox/backup/git-repos/#{bundle_name} --all`
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.