FAKE - F# Make - A DSL for build tasks and more FAKE
6.0.0

Lookig for older versions of the documentation, pre FAKE v6? See 

v5.fake.build

Branches Module

Contains helper functions which allow to deal with git branches.

Functions and values

Function or value Description

Branches.checkout repositoryDir create branch

Full Usage: Branches.checkout repositoryDir create branch

Parameters:
    repositoryDir : string - The git repository.
    create : bool - Set this to true if the branch is new.
    branch : string - The new branch.

Performs a checkout of the given branch to the working copy.

repositoryDir : string

The git repository.

create : bool

Set this to true if the branch is new.

branch : string

The new branch.

Branches.checkoutBranch repositoryDir branch

Full Usage: Branches.checkoutBranch repositoryDir branch

Parameters:
    repositoryDir : string - The git repository.
    branch : string - The branch for the checkout.

Performs a checkout of the given branch to the working copy.

repositoryDir : string

The git repository.

branch : string

The branch for the checkout.

Branches.checkoutNewBranch repositoryDir baseBranch branch

Full Usage: Branches.checkoutNewBranch repositoryDir baseBranch branch

Parameters:
    repositoryDir : string - The git repository.
    baseBranch : string - The base branch.
    branch : string - The new branch.

Creates a new branch based on the given baseBranch and checks it out to the working copy.

repositoryDir : string

The git repository.

baseBranch : string

The base branch.

branch : string

The new branch.

Branches.checkoutTracked repositoryDir trackBranch branch

Full Usage: Branches.checkoutTracked repositoryDir trackBranch branch

Parameters:
    repositoryDir : string - The git repository.
    trackBranch : string - The tracking branch.
    branch : string - The branch for the checkout.

Performs a checkout of the given branch with an additional tracking branch.

repositoryDir : string

The git repository.

trackBranch : string

The tracking branch.

branch : string

The branch for the checkout.

Branches.createBranch repositoryDir newBranchName commit

Full Usage: Branches.createBranch repositoryDir newBranchName commit

Parameters:
    repositoryDir : 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.

Creates a new branch from the given commit.

repositoryDir : 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.

Branches.deleteBranch repositoryDir force branch

Full Usage: Branches.deleteBranch repositoryDir force branch

Parameters:
    repositoryDir : string - The git repository.
    force : bool - Determines if git should be run with the force flag.
    branch : string - The branch which should be deleted.

Deletes the given branch.

repositoryDir : string

The git repository.

force : bool

Determines if git should be run with the force flag.

branch : string

The branch which should be deleted.

Branches.deleteTag repositoryDir tag

Full Usage: Branches.deleteTag repositoryDir tag

Parameters:
    repositoryDir : string - The git repository.
    tag : string - The tag which should be deleted.

Deletes the given tag.

repositoryDir : string

The git repository.

tag : string

The tag which should be deleted.

Branches.findMergeBase repositoryDir commit1 commit2

Full Usage: Branches.findMergeBase repositoryDir commit1 commit2

Parameters:
    repositoryDir : 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

Returns the SHA1 of the merge base of the two given commits from the given repository.

repositoryDir : 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

Branches.getAllBranches repositoryDir

Full Usage: Branches.getAllBranches repositoryDir

Parameters:
    repositoryDir : string - The path of the target directory.

Returns: string list

Gets all local and remote branches from the given repository.

repositoryDir : string

The path of the target directory.

Returns: string list

Branches.getLocalBranches repositoryDir

Full Usage: Branches.getLocalBranches repositoryDir

Parameters:
    repositoryDir : string - The path of the target directory.

Returns: string list

Gets all local branches from the given repository.

repositoryDir : string

The path of the target directory.

Returns: string list

Branches.getRemoteBranches repositoryDir

Full Usage: Branches.getRemoteBranches repositoryDir

Parameters:
    repositoryDir : string - The path of the target directory.

Returns: string list

Gets all remote branches from the given repository.

repositoryDir : string

The path of the target directory.

Returns: string list

Branches.getSHA1 repositoryDir commit

Full Usage: Branches.getSHA1 repositoryDir commit

Parameters:
    repositoryDir : 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

Returns the SHA1 of the given commit from the given repository.

repositoryDir : 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

Branches.pull repositoryDir remote branch

Full Usage: Branches.pull repositoryDir remote branch

Parameters:
    repositoryDir : string - The git repository.
    remote : string - The name of the remote.
    branch : string - The name of the branch to pull.

Pulls a given branch from the given remote.

repositoryDir : string

The git repository.

remote : string

The name of the remote.

branch : string

The name of the branch to pull.

Branches.push repositoryDir

Full Usage: Branches.push repositoryDir

Parameters:
    repositoryDir : string - The git repository.

Pushes all branches to the default remote.

repositoryDir : string

The git repository.

Branches.pushBranch repositoryDir remote branch

Full Usage: Branches.pushBranch repositoryDir remote branch

Parameters:
    repositoryDir : string - The git repository.
    remote : string - The remote.
    branch : string - The branch.

Pushes the given branch to the given remote.

repositoryDir : string

The git repository.

remote : string

The remote.

branch : string

The branch.

Branches.pushTag repositoryDir remote tag

Full Usage: Branches.pushTag repositoryDir remote tag

Parameters:
    repositoryDir : string - The git repository.
    remote : string - The remote.
    tag : string - The tag.

Pushes the given tag to the given remote.

repositoryDir : string

The git repository.

remote : string

The remote.

tag : string

The tag.

Branches.revisionsBetween repositoryDir commit1 commit2

Full Usage: Branches.revisionsBetween repositoryDir commit1 commit2

Parameters:
    repositoryDir : 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

Returns the number of revisions between the two given commits.

repositoryDir : 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

Branches.tag repositoryDir tag

Full Usage: Branches.tag repositoryDir tag

Parameters:
    repositoryDir : string - The git repository.
    tag : string - The new tag.

Tags the current branch.

repositoryDir : string

The git repository.

tag : string

The new tag.