经过一番探索,我要把我的头发扯掉,解决办法可能很简单,但我只是忽略了它.
我正在尝试运行一个从PHP到git add -A的shell脚本,并在单击web上的按钮时提交存储库中的所有内容。
<? php
$commitMsg = 'foo';
$output = shell_exec('/Applications/MAMP/htdocs/gitlist/bash/gitlist-commit '.$commitMsg);#!/bin/bash
cd /var/www/html/development
sudo -H -u username git add -A
sudo -H -u username git commit -m $1它在我的MAMP/OSX设置上工作,但不工作在我的Ubuntu盒上。我可能忽略了什么?
在服务器上,我会被返回,我猜这意味着git add -A命令不起作用。我说的对吗?
它也工作时,直接从终端运行,但不运行时,通过网络UI运行。
On branch master
Changes not staged for commit:
(use "git add ..." to update what will be committed)
(use "git checkout -- ..." to discard changes in working directory)
modified: README.md
no changes added to commit (use "git add" and/or "git commit -a")任何帮助都将不胜感激。
发布于 2015-01-13 21:12:06
尝试git add .; git add -u,因为这将完成“添加所有文件”的相同任务,但这是基于您的shell设置的一种潜在的解决方法。
https://stackoverflow.com/questions/27930504
复制相似问题