SuperCollider CLASSES

Git

git interface
Inherits from: Object

Description

An interface to the git toolchain. For more information on git, see http://git.io.

Class Methods

*new (localPath)

creates a new instance of Git, pointing to an existing local git repository.

Arguments:

localPath

path to the git repository.

*isGit (localPath)

returns true, if a local directory is a git repository.

Arguments:

localPath

*checkForGit

returns true, if the git toolchain is found on the system.

Inherited class methods

Instance Methods

info

-remote

-url

-url = value

Returns:

url of the first remote that it finds.

-remoteLatest

Returns:

hash of latest commit on the remote

-localPath

-localPath = value

Returns:

path to local repository

-tag

Returns:

currently checked out tag

-tags

Returns:

avaliable tags

-sha

Returns:

hash of the currently checked out version

-shaForTag (tag)

Arguments:

tag

one of the tags returned by -tags

Returns:

hash of the given tag

-isDirty

Returns:

true if there are local changes

perform actions on remote

-fetch

perform a fetch from remote

-checkout (refspec)

perform a checkout from remote with argument refspec

Arguments:

refspec

-pull

perform a pull from remote

-clone (url)

perform a clone from url into -localPath

Arguments:

url

the url of the remotes

Inherited instance methods

Examples

// create a Git that points to a Quark directory
g = Git(Quarks.all.choose.localPath);

// alternatively, provide a pathname to a local git repository:
g = Git("/path/to/local/repo");

// get all available tags
g.tags;

// return local path
g.localPath;

// return url
g.url;