Download the PHP package phppkg/phpgit without Composer

On this page you can find all versions of the php package phppkg/phpgit. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package phpgit

PhpGit

GitHub tag (latest SemVer) Php Version Unit Tests Deploy Pages

中文说明

PhpGit - 💪 Git wrapper and feature extension library written in PHP.

The project is forked from https://github.com/kzykhys/PHPGit

Features

Installation

Requirements

Method 1: directly composer require

Method 2: update composer.json

Update your composer.json and run composer update

Basic Usage

Git Info

Output:

Changelog

Provide quick generate formatted changelog.

Formatter

Filter

Example

Run example php bin/chlog.php will see:

API

Git commands

git add

Add file contents to the index

Options

git archive

$git->archive(string $file, string $tree = null, string|array|\Traversable $path = null, array $options = [])

Create an archive of files from a named tree

Options

git branch

$git->branch(array $options = [])

Returns an array of both remote-tracking branches and local branches

Output Example
Options

$git->branch->create(string $branch, string $startPoint = null, array $options = [])

Creates a new branch head named $branch which points to the current HEAD, or $startPoint if given

Options

$git->branch->move(string $branch, string $newBranch, array $options = [])

Move/rename a branch and the corresponding reflog

Options

$git->branch->delete(string $branch, array $options = [])

Delete a branch

The branch must be fully merged in its upstream branch, or in HEAD if no upstream was set with --track or --set-upstream.

Options

git cat-file

$git->cat->blob(string $object)

Returns the contents of blob object

$git->cat->type(string $object)

Returns the object type identified by $object

$git->cat->size(string $object)

Returns the object size identified by $object


git checkout

$git->checkout(string $branch, array $options = [])

Switches branches by updating the index, working tree, and HEAD to reflect the specified branch or commit

Options

$git->checkout->create(string $branch, string $startPoint = null, array $options = [])

Create a new branch and checkout

Options

$git->checkout->orphan(string $branch, string $startPoint = null, array $options = [])

Create a new orphan branch, named , started from and switch to it

Options

git clone

$git->clone(string $repository, string $path = null, array $options = [])

Clone a repository into a new directory

Options

git commit

$git->commit(string $message, array $options = [])

Record changes to the repository

Options

git config

$git->config(array $options = [])

Returns all variables set in config file

Options

$git->config->set(string $name, string $value, array $options = [])

Set an option

Options

$git->config->add(string $name, string $value, array $options = [])

Adds a new line to the option without altering any existing values

Options

git describe

$git->describe(string $committish = null, array $options = [])

Returns the most recent tag that is reachable from a commit

Output Example
Options

$git->describe->tags(string $committish = null, array $options = [])

Equivalent to $git->describe($committish, ['tags' => true]);


git fetch

$git->fetch(string $repository, string $refspec = null, array $options = [])

Fetches named heads or tags from one or more other repositories, along with the objects necessary to complete them

Options

$git->fetch->all(array $options = [])

Fetch all remotes

Options

git init

$git->init(string $path, array $options = [])

Create an empty git repository or reinitialize an existing one

Options

git log

$git->log(string $revRange = '', string $path = null, array $options = [])

Returns the commit logs

Output Example
Options

git merge

$git->merge(string|array|\Traversable $commit, string $message = null, array $options = [])

Incorporates changes from the named commits into the current branch

Options

$git->merge->abort()

Abort the merge process and try to reconstruct the pre-merge state


git mv

$git->mv(string|array|\Iterator $source, string $destination, array $options = [])

Move or rename a file, a directory, or a symlink

Options

git pull

$git->pull(string $repository = null, string $refspec = null, array $options = [])

Fetch from and merge with another repository or a local branch


git push

$git->push(string $repository = null, string $refspec = null, array $options = [])

Update remote refs along with associated objects


git rebase

$git->rebase(string $upstream = null, string $branch = null, array $options = [])

Forward-port local commits to the updated upstream head

Options

$git->rebase->continues()

Restart the rebasing process after having resolved a merge conflict

$git->rebase->abort()

Abort the rebase operation and reset HEAD to the original branch

$git->rebase->skip()

Restart the rebasing process by skipping the current patch


git remote

$git->remote()

Returns an array of existing remotes

Output Example

$git->remote->add(string $name, string $url, array $options = [])

Adds a remote named $name for the repository at $url

Options

$git->remote->rename(string $name, string $newName)

Rename the remote named $name to $newName

$git->remote->rm(string $name)

Remove the remote named $name

$git->remote->show(string $name)

Gives some information about the remote $name

Output Example

$git->remote->prune(string $name = null)

Deletes all stale remote-tracking branches under $name

$git->remote->head(string $name, string $branch = null)

Alias of set()

$git->remote->head->set(string $name, string $branch)

Sets the default branch for the named remote

$git->remote->head->delete(string $name)

Deletes the default branch for the named remote

$git->remote->head->remote(string $name)

Determine the default branch by querying remote

$git->remote->branches(string $name, array $branches)

Alias of set()

$git->remote->branches->set(string $name, array $branches)

Changes the list of branches tracked by the named remote

$git->remote->branches->add(string $name, array $branches)

Adds to the list of branches tracked by the named remote

$git->remote->url(string $name, string $newUrl, string $oldUrl = null, array $options = [])

Alias of set()

Options

$git->remote->url->set(string $name, string $newUrl, string $oldUrl = null, array $options = [])

Sets the URL remote to $newUrl

Options

$git->remote->url->add(string $name, string $newUrl, array $options = [])

Adds new URL to remote

Options

$git->remote->url->delete(string $name, string $url, array $options = [])

Deletes all URLs matching regex $url

Options

git reset

$git->reset(string|array|\Traversable $paths, string $commit = null)

Resets the index entries for all $paths to their state at $commit

$git->reset->soft(string $commit = null)

Resets the current branch head to $commit

Does not touch the index file nor the working tree at all (but resets the head to $commit, just like all modes do). This leaves all your changed files "Changes to be committed", as git status would put it.

$git->reset->mixed(string $commit = null)

Resets the current branch head to $commit

Resets the index but not the working tree (i.e., the changed files are preserved but not marked for commit) and reports what has not been updated. This is the default action.

$git->reset->hard(string $commit = null)

Resets the current branch head to $commit

Resets the index and working tree. Any changes to tracked files in the working tree since $commit are discarded

$git->reset->merge(string $commit = null)

Resets the current branch head to $commit

Resets the index and updates the files in the working tree that are different between $commit and HEAD, but keeps those which are different between the index and working tree (i.e. which have changes which have not been added). If a file that is different between $commit and the index has unstaged changes, reset is aborted

$git->reset->keep(string $commit = null)

Resets the current branch head to $commit

Resets index entries and updates files in the working tree that are different between $commit and HEAD. If a file that is different between $commit and HEAD has local changes, reset is aborted.

$git->reset->mode(string $mode, string $commit = null)

Resets the current branch head to $commit

Possibly updates the index (resetting it to the tree of $commit) and the working tree depending on $mode


git rm

$git->rm(string|array|\Traversable $file, array $options = [])

Remove files from the working tree and from the index

Options

$git->rm->cached(string|array|\Traversable $file, array $options = [])

Equivalent to $git->rm($file, ['cached' => true]);

Options

git shortlog

$git->shortlog(string|array|\Traversable $commits = HEAD)

Summarize 'git log' output

Output Example

$git->shortlog->summary(string $commits = HEAD)

Suppress commit description and provide a commit count summary only

Output Example

git show

$git->show(string $object, array $options = [])

Shows one or more objects (blobs, trees, tags and commits)

Options

git stash

$git->stash()

Save your local modifications to a new stash, and run git reset --hard to revert them

$git->stash->save(string $message = null, array $options = [])

Save your local modifications to a new stash, and run git reset --hard to revert them.

$git->stash->lists(array $options = [])

Returns the stashes that you currently have

Output Example

$git->stash->show(string $stash = null)

Show the changes recorded in the stash as a diff between the stashed state and its original parent

Output Example

$git->stash->drop(string $stash = null)

Remove a single stashed state from the stash list

$git->stash->pop(string $stash = null, array $options = [])

Remove a single stashed state from the stash list and apply it on top of the current working tree state

$git->stash->apply(string $stash = null, array $options = [])

Like pop, but do not remove the state from the stash list

$git->stash->branch(string $name, string $stash = null)

Creates and checks out a new branch named starting from the commit at which the was originally created, applies the changes recorded in to the new working tree and index

$git->stash->clear()

Remove all the stashed states

$git->stash->create()

Create a stash (which is a regular commit object) and return its object name, without storing it anywhere in the ref namespace

Output Example

git status

$git->status(array $options = [])

Returns the working tree status

Constants
Output Example
Options

git tag

$git->tag()

Returns an array of tags

Output Example

$git->tag->create(string $tag, string $commit = null, array $options = [])

Creates a tag object

Options

$git->tag->delete(string|array|\Traversable $tag)

Delete existing tags with the given names

$git->tag->verify(string|array|\Traversable $tag)

Verify the gpg signature of the given tag names


git ls-tree

$git->tree(string $branch = master, string $path = '')

Returns the contents of a tree object

Output Example

License

The MIT License

Author

Developed by Kazuyuki Hayashi (@kzykhys), Maintained by @inhere


All versions of phpgit with dependencies

PHP Build Version
Package Version
Requires php Version >8.1.0
toolkit/cli-utils Version ~2.0
toolkit/stdlib Version ~2.0
symfony/process Version ~6.0
symfony/options-resolver Version ~6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package phppkg/phpgit contains the following files

Loading the files please wait ....