Andrii Furmanets
Andrii Furmanets

Reputation: 1161

Rake task which commit and push to repository

Is there any way to create rake task that can commit changes and push them to remote repository?

Upvotes: 0

Views: 219

Answers (1)

Grych
Grych

Reputation: 2901

You can always do such task yourself:

task "commit_and_push" => :environment do
      system 'git commit -a -m "message"; git push'
end

But the rake is really slow, the quicker way is to create a shell script like that:

#!/bin/sh
git commit -a -m "$1"
git push

Upvotes: 1

Related Questions