Provides support for performing branch-related operations on a Git repository.
Details of each operation's properties and methods are available on the doc page for the class. The following operations are supported directly on this service instance.
| Constructor and description |
|---|
BranchService
(Repository repository) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
Branch |
current()Gets the branch associated with the current HEAD. |
|
Branch |
getCurrent()Gets the branch associated with the current HEAD. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), 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() |
Gets the branch associated with the current HEAD.
null if the HEAD is detachedGets the branch associated with the current HEAD.
null if the HEAD is detached