Python Fabric Git Pull Merge消息

时间:2013-10-01 00:44:55

标签: python git fabric

我已经 Python Fabric 运行良好,但我有一个问题。在执行$ fab deploy时,我总是会得到合并弹出窗口

Please enter a commit message to explain why this merge is necessary,
especially if it merges an updated upstream into a topic branch.

我不明白为什么总是如此。如果我在SSH中执行完全相同的命令来拉取我的git repo,它可以在没有合并问题的情况下工作。

我会说我在Windows 8上并且如果重要的话就拉到linux。 Line结尾不应该是一个问题,它从来没有。

这是 fabfile.py

from fabric.api import *
from fabric.colors import *

env.user = 'username'
env.host_string = '99.99.0.99'

def deploy(branch = 'master'):
    path = '/var/www/mysite/htdocs'
    with cd(path):
        run("git pull origin {0}".format(branch))

def commit(branch = 'master'):
    local('git add -u')
    local('git add .')
    message = prompt("commit msg: ")
    local('git commit -m "{0}"'.format(message))
    local('git push origin {0}'.format(branch))

1 个答案:

答案 0 :(得分:1)

它要求你进行合并,因为拉动不是快进合并。

检查您的分支机构是否没有绑定,并且您没有在部署端进行路由提交。

相关问题