Branches Module
Contains helper functions which allow to deal with git branches.
Functions and values
Function or value | Description |
Full Usage:
Branches.checkout repositoryDir create branch
Parameters:
string
-
The git repository.
create : bool
-
Set this to true if the branch is new.
branch : string
-
The new branch.
|
|
Full Usage:
Branches.checkoutBranch repositoryDir branch
Parameters:
string
-
The git repository.
branch : string
-
The branch for the checkout.
|
|
Full Usage:
Branches.checkoutNewBranch repositoryDir baseBranch branch
Parameters:
string
-
The git repository.
baseBranch : string
-
The base branch.
branch : string
-
The new branch.
|
|
Full Usage:
Branches.checkoutTracked repositoryDir trackBranch branch
Parameters:
string
-
The git repository.
trackBranch : string
-
The tracking branch.
branch : string
-
The branch for the checkout.
|
|
Full Usage:
Branches.createBranch repositoryDir newBranchName commit
Parameters:
string
-
The git repository.
newBranchName : string
-
The new branch.
commit : string
-
The commit which git should take as the new HEAD. - can be HEAD , HEAD~1 , ...
, a branch name or a prefix of a SHA1.
|
|
Full Usage:
Branches.deleteBranch repositoryDir force branch
Parameters:
string
-
The git repository.
force : bool
-
Determines if git should be run with the force flag.
branch : string
-
The branch which should be deleted.
|
|
Full Usage:
Branches.deleteTag repositoryDir tag
Parameters:
string
-
The git repository.
tag : string
-
The tag which should be deleted.
|
|
Full Usage:
Branches.findMergeBase repositoryDir commit1 commit2
Parameters:
string
-
The git repository.
commit1 : string
-
The first commit for which git should find the merge base.
commit2 : string
-
The second commit for which git should find the merge base.
Returns: string
|
|
Full Usage:
Branches.getAllBranches repositoryDir
Parameters:
string
-
The path of the target directory.
Returns: string list
|
|
Full Usage:
Branches.getLocalBranches repositoryDir
Parameters:
string
-
The path of the target directory.
Returns: string list
|
|
Full Usage:
Branches.getRemoteBranches repositoryDir
Parameters:
string
-
The path of the target directory.
Returns: string list
|
|
Full Usage:
Branches.getSHA1 repositoryDir commit
Parameters:
string
-
The git repository.
commit : string
-
The commit for which git should return the SHA1 - can be HEAD , HEAD~1 , ... ,
a branch name or a prefix of a SHA1.
Returns: string
|
|
Full Usage:
Branches.pull repositoryDir remote branch
Parameters:
string
-
The git repository.
remote : string
-
The name of the remote.
branch : string
-
The name of the branch to pull.
|
|
Full Usage:
Branches.push repositoryDir
Parameters:
string
-
The git repository.
|
|
Full Usage:
Branches.pushBranch repositoryDir remote branch
Parameters:
string
-
The git repository.
remote : string
-
The remote.
branch : string
-
The branch.
|
|
Full Usage:
Branches.pushTag repositoryDir remote tag
Parameters:
string
-
The git repository.
remote : string
-
The remote.
tag : string
-
The tag.
|
|
Full Usage:
Branches.revisionsBetween repositoryDir commit1 commit2
Parameters:
string
-
The git repository.
commit1 : string
-
The first commit for which git should find the merge base.
commit2 : string
-
The second commit for which git should find the merge base.
Returns: int
|
|
Full Usage:
Branches.tag repositoryDir tag
Parameters:
string
-
The git repository.
tag : string
-
The new tag.
|
|