Git Checkout
Checks out a specific branch, tag, or commit.
Inputs#
| Port | Description |
|---|---|
invalid port type: git-repo Repository |
The Git repository to perform the checkout on. |
| The branch, tag, or commit hash to check out. | |
| If true, creates a new branch with the 'Reference' name if it does not exist. | |
| If true, discards uncommitted local changes to force the checkout. |
Outputs#
| Port | Description |
|---|---|
| Executes if the checkout is successful. | |
| Executes if the checkout fails. |
Addendum#
Updates the files in the working directory to match the version of a specific branch, tag, or commit.
The reference input can be a branch name (e.g., main), a tag (e.g., v1.2.0), or a commit hash.
Options#
- Create Branch: If
true, creates a new branch with the givenreferencename if it doesn't already exist. The new branch is created from the currentHEAD. - Force: If
true, discards any uncommitted local changes in the working directory to perform the checkout. Warning: This can lead to permanent data loss.
ID: core/git-checkout@v1