Property | Type | Description | |
---|---|---|---|
$query_count | Query counter | ||
$status_cache | Cached git status structure |
Method | Description | |
---|---|---|
add ( $pathspec, $forceIncludeIgnored = true ) | ||
cat_file ( $ids ) | ||
commit ( $message, $author = null, $pathspec = null, $deferred = false ) | ||
config ( $key = null, $value = null, $guess_repo = true ) | # ----------------------------------------------------------------------------------------------- | |
diff ( $commits = null, $paths = null, $args = null ) | Each argument can be a string or and array of strings (or null to skip) | |
escargs ( $args ) | ||
exec ( $cmd, $input = null, $gitdir = null, $worktree = null, $allow_guess = false, $ignore_git_errors = false ) | Execute a git command | |
id_for_pathspec ( $pathspec ) | Retrieve ids for $pathspec (string or array of strings) at the current branch head | |
init ( $gitdir = null, $worktree = null, $shared = 'true' ) | ||
ls_basic ( $args = null, $paths = null ) | ||
ls_modified ( $paths = null, $exclude = null ) | ||
ls_removed ( $paths = null, $exclude = null ) | ||
ls_staged ( $paths = null ) | ||
ls_untracked ( $paths = null, $exclude = null ) | ||
reset ( $pathspec = null, $commitobj = null, $flags = '-q' ) | ||
status ( $raw = false, $cached = true ) : array | git status |
static public commit ( $message, $author = null, $pathspec = null, $deferred = false ) |
static public config ( $key = null, $value = null, $guess_repo = true ) |
static public diff ( $commits = null, $paths = null, $args = null ) |
static public exec ( $cmd, $input = null, $gitdir = null, $worktree = null, $allow_guess = false, $ignore_git_errors = false ) |
static public id_for_pathspec ( $pathspec ) |
static public init ( $gitdir = null, $worktree = null, $shared = 'true' ) |
static public reset ( $pathspec = null, $commitobj = null, $flags = '-q' ) |
static public status ( $raw = false, $cached = true ) : array | ||
return | array | array( 'branch' => 'master', ['upstream' => array('name' => 'origin/master', 'distance' => 24),] ['staged' => array( 'filename' => array('status'=>'added'|'modified'|'deleted') | array('status'=>'renamed','newname'=>'filename') ], ... ),] ['unstaged' => array( 'filename' => array('status'=>'added'|'modified'|'deleted') | array('status'=>'renamed','newname'=>'filename') ], ... ),] ['untracked' => array( 'filename' => 1, ... )] ) |