From 9412822ff3ffc92fb947ded25fad281ab101ff35 Mon Sep 17 00:00:00 2001 From: "aaron.wang" Date: Fri, 15 Mar 2013 19:09:40 +0800 Subject: [PATCH] Fixed #105. Use '-M' to force rename branch when setup git in deploying process, otherwise, git will throw error: 'fatal: A branch named 'master' already exists.' if 'config.branch' is 'master' and therefore later process will fail. --- lib/plugins/deployer/github.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/plugins/deployer/github.js b/lib/plugins/deployer/github.js index f456065bc8..d7c6325f48 100644 --- a/lib/plugins/deployer/github.js +++ b/lib/plugins/deployer/github.js @@ -47,7 +47,7 @@ extend.deployer.register('github', function(args, callback){ ['init'], ['add', '-A'], ['commit', '-m', 'First commit'], - ['branch', '-m', config.branch], + ['branch', '-M', config.branch], ['remote', 'add', 'github', config.repository] ]; @@ -97,4 +97,4 @@ extend.deployer.register('github', function(args, callback){ console.log('Deploy completely.'); callback(); }); -}); \ No newline at end of file +});