Git UI Module

Method Overview

Method Description
checkoutBranch() Checkout the branch with the given name.
createBranch() Opens a dialog, allowing to create a new branch in the repository.
deleteBranch() Opens a dialog, allowing to select branches that ought to be removed.
getRepository() Get the JGit repository for the first selected repository node.
handleUncommittedFiles() Opens a dialog, allowing to commit, stash, or reset uncommitted changes.
mergeFrom() Merges the given branch into the current branch.
rebaseOn() Rebase the current branch onto the HEAD of the specified branch.
renameBranch() Opens a dialog, allowing to select a branch that ought to be renamed.
resetCommits() Resets the current branch hard by the given number of commits.

Methods

checkoutBranch

void checkoutBranch([java.lang.Object repository], [java.lang.String branchName])

Checkout the branch with the given name.

Parameter Type Description
repository java.lang.Object The JGit repository to work with.
Optional: defaults to <null>.
branchName java.lang.String The (possibly abbreviated) name of the branch to checkout.
Optional: defaults to <null>.

createBranch

void createBranch([java.lang.Object repository])

Opens a dialog, allowing to create a new branch in the repository.

Parameter Type Description
repository java.lang.Object The JGit repository to work with.
Optional: defaults to <null>.

deleteBranch

void deleteBranch([java.lang.Object repository])

Opens a dialog, allowing to select branches that ought to be removed.

Parameter Type Description
repository java.lang.Object The JGit repository to work with.
Optional: defaults to <null>.

getRepository

org.eclipse.jgit.lib.Repository getRepository([org.eclipse.jface.viewers.ISelection selection])

Get the JGit repository for the first selected repository node.

Parameter Type Description
selection org.eclipse.jface.viewers.ISelection IStructuredSelection containing a RepositoryNode as its first element.
Optional: defaults to <null>.

Returns:org.eclipse.jgit.lib.Repository ... The JGit repository.

handleUncommittedFiles

void handleUncommittedFiles([java.lang.Object repository])

Opens a dialog, allowing to commit, stash, or reset uncommitted changes.

Parameter Type Description
repository java.lang.Object The JGit repository to work with.
Optional: defaults to <null>.

mergeFrom

void mergeFrom([java.lang.Object repository], [java.lang.String branchName])

Merges the given branch into the current branch.

Parameter Type Description
repository java.lang.Object The git repository to work with.
Optional: defaults to <null>.
branchName java.lang.String The (possibly abbreviated) name of the branch to merge.
Optional: defaults to <null>.

rebaseOn

void rebaseOn([java.lang.Object repository], [java.lang.String branchName])

Rebase the current branch onto the HEAD of the specified branch.

Parameter Type Description
repository java.lang.Object The JGit repository to work with.
Optional: defaults to <null>.
branchName java.lang.String The (possibly abbreviated) name of the branch to rebase on.
Optional: defaults to <null>.

renameBranch

void renameBranch([java.lang.Object repository])

Opens a dialog, allowing to select a branch that ought to be renamed.

Parameter Type Description
repository java.lang.Object The JGit repository to work with.
Optional: defaults to <null>.

resetCommits

void resetCommits([java.lang.Object repository], [java.lang.Integer commits])

Resets the current branch hard by the given number of commits.

Parameter Type Description
repository java.lang.Object The git repository to work with.
Optional: defaults to <null>.
commits java.lang.Integer The number of commits to go back from HEAD.
Optional: defaults to <null>.