我正在使用 Fabric 运行 ANT 任务,然后上传到 GitHub。该脚本有效,但并非始终如一,因此很难理解原因。
我一直在这里读到 Fabric 中的过程是;
git add
git commit
git push
但我一直看到这个输出;
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
nothing to commit (working directory clean)
Fatal error: local() encountered an error (return code 1) while executing 'git commit -m "Latest Selenium screenshots for View Employee"'
Aborting.
我写的函数是这样的;
def deploy():
process = test()
os.chdir('\\Documents and Settings\markw\GitTest')
with cd('\\Documents and Settings\markw\GitTest'):
local('git reset --soft HEAD')
local('git pull origin master')
local('git add -A')
local('git commit -m "Latest Selenium screenshots for %s"' % (process))
local('git push -u origin master')
我的提交遗漏了什么导致这里出现问题?是否有另一个标志来组合已排队的提交?