Download the PHP package czproject/git-php without Composer
On this page you can find all versions of the php package czproject/git-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package git-php
Git-PHP
Library for work with Git repository in PHP.
Installation
Download a latest package or use Composer:
Library requires PHP 5.6 or later and git
client (path to Git must be in system variable PATH
).
Git installers:
- for Linux - https://git-scm.com/download/linux
- for Windows - https://git-scm.com/download/win
- for others - https://git-scm.com/downloads
Usage
Initialization of empty repository
With parameters:
Cloning of repository
Basic operations
Branches
Tags
History
Remotes
Troubleshooting - How to provide username and password for commands
1) use SSH instead of HTTPS - https://stackoverflow.com/a/8588786 2) store credentials to Git Credential Storage
- http://www.tilcode.com/push-github-without-entering-username-password-windows-git-bash/
- https://help.github.com/articles/caching-your-github-password-in-git/
- https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage 3) insert user and password into remote URL - https://stackoverflow.com/a/16381160
git remote add origin https://user:password@server/path/repo.git
4) forpush()
you can use--repo
argument - https://stackoverflow.com/a/12193555$git->push(NULL, ['--repo' => 'https://user:password@server/path/repo.git']);
Other commands
For running other commands you can use execute
method:
Custom methods
You can create custom methods. For example:
License: New BSD License
Author: Jan Pecha, https://www.janpecha.cz/