class Git extends java.lang.Object
Wrap for git commands. This executes git directly and does not use a Git library. Therefore, Git must be in the users PATH.
| Constructor and description |
|---|
Git(java.nio.file.Path projectDirectory) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
boolean |
doesTagExist(java.lang.Object tagName)Determines if the given tag exists in the local repository. |
|
ProcessResult |
fetchTags()Fetches the new tags from the remote repository by performing a "git fetch -t". |
|
ProcessResult |
pull()Performs a "git pull" command and returns the Process. |
|
ProcessResult |
status(java.lang.Object options)Performs a "git status" command and returns the Process. |
|
void |
tag(java.lang.Object tagName, java.lang.Object comment)Creates a remote tag. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Determines if the given tag exists in the local repository.
tagName - The tag name.Fetches the new tags from the remote repository by performing a "git fetch -t". This waits for the process to complete. The caller can check the Process for the exit code and any output.
Performs a "git pull" command and returns the Process. This waits for the process to complete. The caller can check the Process for the exit code and any output.
Performs a "git status" command and returns the Process. This waits for the process to complete. The caller can check the Process for the exit code and any output.
Creates a remote tag. This is a two part process and if the first step (create the local tag) fails, then this throws a RuntimeException.
tagName - The tag to create.comment - The comment used in the commit for the tag.