sys/tool/git

git support

Dependency Graph

sys/tool/git: Library Dependencies

View color source code (raw) for this file

View reStructuredText (rst) source code for this page

Native Dependencies

Library Configuration

$git_repodir

Location of shared repositories

$git_short

Set to true to pass --short

$git_porcelin

Set to true to pass --porcelin

$git_push_tags

Set to true to pass --tags to git push

Internal Functions

git_run()

Runs the git program.

Repository Management

git_create()

Creates an empty repository in a new directory ($2).

git_init()

Initializes a repository in the given directory ($2),

git_clone()

Clones a repository ($1) into a new directory ($2).

git_pull()

Runs git pull with the given arguments ($@).

git_update()

Updates a repository by rebasing local current changes onto the remote branch. This will fail if there are unstashed changes or if a merge conflict occurrs.

$1 - Path to repository (optional)

git_fetch()

Retrieves new objects for a repository.

git_clone_or_update()

Clones or updates a repository ($1) at the given path ($2).

git_push()

Runs git push to send changes to the remote. If $git_push_tags is true, this will push tags.

$@ - Extra arguments (optional)

git_push_all()

Runs git push to send changes to the remote.

Working Copies

git_repo_dir()

Prints the path to the current working copy. The resulting path will contain the .git directory for the current repository.

git_checkout()

Runs git checkout with the given arguments ($@).

git_status()

Runs git status with the given arguments ($@).

git_status_new()

Prints all untracked changes to repository files and lists top-level untracked files. This does not print contents of untracked directories; for that, use git_status_all().

git_status_repo()

Prints all untracked changes to repository files

git_status_all()

Prints all untracked changes and files

Staging

git_add()

Adds files ($@) to git index.

$@ - Files to add

git_mv()

Moves tracked files ($@).

$@ - Arguments

git_reset()

Runs git reset

$@ - Arguments

git_reset_soft()

Performas a soft reset, removing files from the index. A soft reset will leave the changes intact in the working copy.

$@ - Arguments

git_reset_hard()

Performas a hard reset. In addition to the actions of a soft reset, a hard reset reverts the changes in the working copy.

$@ - Arguments

Commits

git_commit()

Runs git commit

$@ - Extra arguments (optional)

git_commit_drop()

Drops the commit at the tip of the current branch.

Branches

git_rev_parse()

Runs the rev-parse command

Tags

git_tag()

Creates a new tag.

$@ - Tag names

git_tag_delete()

Delete the name tag.

$@ - Tag names

git_tag_prev()

Prints the name of the last tag on the current branch.

Logs

git_log()

Views the git log

$@ - Extra arguments (optional)

git_commit_title()

Prints title of the commit message from the given revision ($1).

$1 - Revision


View the Developer Guide Index

View the Reference Manual Index


Generated on Fri Jul 28 14:38:32 PDT 2017 by mcsh d14 v0.23.0.