Skip to content

Git Checkout

Switches branches or restores working tree files.

Inputs#

Port Description
invalid port type: git-repo Repository
The Git repository object from a clone or open node.
Reference
The name of the branch, tag, or the commit hash to check out.
Create Branch
If true, creates a new branch named after the 'Reference' input.
Force
If true, forces the checkout, discarding any local changes in the working directory. Use with caution.

Outputs#

Port Description
Success
Executes if the checkout operation is successful.
Error
Executes if there is an error during checkout.

Addendum#

This node checks out a specific branch, tag, or commit, updating the files in the working directory to match that version.

It can also be used to create a new branch from the current HEAD.

ID: git-checkout@v1