Nue*_*apa 3 php git github yii
我想使用PHP代码添加并提交到本地git存储库
我在github的新宝宝,所以我不理解github路径上的路径git.exe在C:\ Users\Administrator\AppData\Local\GitHub\PortableGit_054f2e797ebafd44a30203088cd3d58663c627ef\libexec\git-core
回购路径C:\ Users\Administrator\Documents\GitHub\confre
$path = "C:\Users\Administrator\Documents\GitHub\confre";
chdir($path);
echo shell_exec("git add . ");
echo shell_exec("git commit -m 'commit form php' ");
Run Code Online (Sandbox Code Playgroud)
它不起作用.帮帮我吧
谢谢
我使用http://github.com/kbjr/Git.php它的工作!
require_once('Git.php');
$repo = Git::open('gitphp'); // -or- Git::create('/path/to/repo')
$repo->run(' config user.email "your email"');
$repo->run(' config user.name "your username"');
echo $repo->run(' log -p');
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2879 次 |
| 最近记录: |