Reference · Tools
Git
Execute git version control operations on local repositories.
The Git node executes version control operations directly on repositories stored in the BusyBot workspace directory. It covers the full day-to-day workflow: clone a repo, stage and commit changes, push to a remote, manage branches and tags, and read historical file content. A typical use case is an automated pipeline that pulls the latest code, applies generated changes, commits them with a message, and pushes — all without leaving your workflow.
- Node type
- Action (binary)
- Parameters
- 23
- Outputs
- Output, Error
- Credentials
- Git Password
Git
Execute git version control operations on local repositories
Overview
The Git tool performs version control operations on repositories held in the server workspace. It supports add (stage files), addConfig (set a config property), clone (clone a repository), commit (commit staged changes), fetch (fetch from remote), listConfig (return git config), log (commit history), pull (pull from remote), push (push to remote), pushTags (push all tags), reflog (reference log), status (repo status), switchBranch (switch or create a branch), tag (create a tag), and showFile (read file content from git history as binary data). All filesystem access is confined to the workspace directory, and authentication for remote operations is optional.
Category: Development
Tool Name: git
Version: 1
Appearance: Icon: si-git | Color: #F05032
Node Type
Action (Binary) — handles file/binary data operations
Input / Output
| Direction | Port(s) |
|---|---|
| Input | Input |
| Output | Output, Error |
Credentials
This tool requires Git Password credentials. See the Credentials Guide for setup instructions.
Operations
| Operation | Value | Description |
|---|---|---|
| Add | add | Add a file or folder to commit |
| Add Config | addConfig | Add configuration property |
| Clone | clone | Clone a repository |
| Commit | commit | Commit files or folders to git |
| Fetch | fetch | Fetch from remote repository |
| List Config | listConfig | Return current configuration |
| Log | log | Return git commit history |
| Pull | pull | Pull from remote repository |
| Push | push | Push to remote repository |
| Push Tags | pushTags | Push tags to remote repository |
| Reflog | reflog | Return reference log |
| Show File | showFile | Read file content from git repository at a specific ref as binary data |
| Status | status | Return status of current repository |
| Switch Branch | switchBranch | Switch to a different branch |
| Tag | tag | Create a new tag |
Parameters
Add (add)
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
Repository Path (repositoryPath) | string | Yes | — | Local path of the git repository to operate on. Must be within the workspace/ directory. Supports expressions. |
| Paths to Add | string | Yes | — | Comma-separated list of paths (absolute or relative to Repository Path) of files or folders to add. Supports expressions. |
Add Config (addConfig)
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
Repository Path (repositoryPath) | string | Yes | — | Local path of the git repository to operate on. Must be within the workspace/ directory. Supports expressions. |
| Key | options | Yes | — | Name of the configuration key to set. Restricted to allowed keys for security. |
Options: user.email, user.name, remote.origin.url | ||||
| Value | string | Yes | — | Value of the configuration key to set. Supports expressions. |
| Options | collection | No | {} | Additional options for the addConfig operation. |
| — Mode | options | No | set | Append setting rather than set it in the local config. |
Options: append, set |
Clone (clone)
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
New Repository Path (repositoryPath) | string | Yes | — | Local path to clone the git repository into. Must be within the workspace/ directory. Supports expressions. |
| Source Repository | string | Yes | — | The URL or path of the repository to clone. Supports expressions. |
| Authentication | options | No | none | The authentication method to use. |
Options: gitPassword (use the configured Git Password credential), none |
Commit (commit)
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
Repository Path (repositoryPath) | string | Yes | — | Local path of the git repository to operate on. Must be within the workspace/ directory. Supports expressions. |
| Message | string | No | — | The commit message to use. Supports expressions like {{ $json.message }}. |
| Options | collection | No | {} | Additional options for the commit operation. |
| — Branch | string | No | — | The branch to switch to before committing. If empty, commits to current branch. |
| — Paths to Add | string | No | — | Comma-separated list of paths (absolute or relative to Repository Path) to include in commit. If not set, all staged files are committed. |
Fetch (fetch)
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
Repository Path (repositoryPath) | string | Yes | — | Local path of the git repository to operate on. Must be within the workspace/ directory. Supports expressions. |
List Config (listConfig)
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
Repository Path (repositoryPath) | string | Yes | — | Local path of the git repository to operate on. Must be within the workspace/ directory. Supports expressions. |
Log (log)
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
Repository Path (repositoryPath) | string | Yes | — | Local path of the git repository to operate on. Must be within the workspace/ directory. Supports expressions. |
| Return All | boolean | No | false | Whether to return all results or only up to a given limit. |
| Limit | number | No | 100 | Max number of results to return. (shown when Return All is false) |
| Options | collection | No | {} | Additional options for the log operation. |
| — File | string | No | — | The path (absolute or relative to Repository Path) of a file or folder to get the history of. |
Pull (pull)
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
Repository Path (repositoryPath) | string | Yes | — | Local path of the git repository to operate on. Must be within the workspace/ directory. Supports expressions. |
Push (push)
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
Repository Path (repositoryPath) | string | Yes | — | Local path of the git repository to operate on. Must be within the workspace/ directory. Supports expressions. |
| Authentication | options | No | none | The authentication method to use. |
Options: gitPassword (use the configured Git Password credential), none | ||||
| Options | collection | No | {} | Additional options for the push operation. |
| — Branch | string | No | — | The branch to switch to before pushing. If empty, pushes current branch. |
| — Target Repository | string | No | — | The URL or path of the repository to push to. |
Push Tags (pushTags)
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
Repository Path (repositoryPath) | string | Yes | — | Local path of the git repository to operate on. Must be within the workspace/ directory. Supports expressions. |
Reflog (reflog)
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
Repository Path (repositoryPath) | string | Yes | — | Local path of the git repository to operate on. Must be within the workspace/ directory. Supports expressions. |
| Return All | boolean | No | false | Whether to return all results or only up to a given limit. |
| Limit | number | No | 100 | Max number of results to return. (shown when Return All is false) |
| Options | collection | No | {} | Additional options for the reflog operation. |
| — Reference | string | No | — | The reference to show the reflog for (e.g., HEAD, branch name). Leave empty for HEAD. |
Show File (showFile)
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
Repository Path (repositoryPath) | string | Yes | — | Local path of the git repository to operate on. Must be within the workspace/ directory. Supports expressions. |
| File Path | string | Yes | — | The path of the file within the repository to read. Supports expressions. |
| Ref | string | No | HEAD | The git reference (branch, tag, commit hash) to read the file from. Defaults to HEAD. Supports expressions. |
| Binary Property | string | No | data | Name of the binary property to write the file content to on the output item. Names are case-sensitive — see the upstream node’s Binary Data panel for the exact names to use. |
Status (status)
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
Repository Path (repositoryPath) | string | Yes | — | Local path of the git repository to operate on. Must be within the workspace/ directory. Supports expressions. |
Switch Branch (switchBranch)
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
Repository Path (repositoryPath) | string | Yes | — | Local path of the git repository to operate on. Must be within the workspace/ directory. Supports expressions. |
| Branch Name | string | Yes | — | The name of the branch to switch to. Supports expressions. |
| Options | collection | No | {} | Additional options for the switchBranch operation. |
| — Create Branch If Not Exists | boolean | No | true | Whether to create the branch if it does not exist. |
| — Start Point | string | No | — | The commit/branch/tag to create the new branch from. If not set, creates from current HEAD. (shown when Create Branch If Not Exists is true) |
| — Force Switch | boolean | No | false | Whether to force the branch switch, discarding any local changes. |
| — Set Upstream | boolean | No | false | Whether to set up tracking to a remote branch when creating a new branch. (shown when Create Branch If Not Exists is true) |
| — Remote Name | string | No | origin | The name of the remote to track. (shown when Create Branch If Not Exists is true and Set Upstream is true) |
Tag (tag)
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
Repository Path (repositoryPath) | string | Yes | — | Local path of the git repository to operate on. Must be within the workspace/ directory. Supports expressions. |
| Tag Name | string | Yes | — | The name of the tag to create. Supports expressions. |
All Operations
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Max Concurrency | number | No | 1 | Maximum number of items to process concurrently. Low default because git operations can conflict when run in parallel on the same repository. |
Output Data
Every operation merges onto the input item’s JSON — nothing the item arrived with is discarded, and binary data is forwarded unchanged. Four of the operations fan out.
| Operation | Output |
|---|---|
add, addConfig, clone, commit, fetch, pull, push, pushTags, tag | One item with success: true added. |
switchBranch | One item with success: true and branch (the branch now checked out). |
status | One item carrying the working-tree status git reported — the current branch, its tracking information, and the lists of staged, modified, created, deleted, renamed, conflicted and untracked files. |
listConfig | Fans out — one output item per config file, each carrying _file (the config file it came from) plus that file’s key/value pairs. Remote URLs are stripped of any embedded credentials before they reach the item. |
log | Fans out — one output item per commit, each carrying the commit’s own fields, including its hash, date, message and author. |
reflog | Fans out — one output item per reflog line, carrying hash, ref, action, message and raw. A line that does not match the expected format contributes raw only. |
showFile | One item with fileName, filePath, ref and fileSize added, plus the file’s contents as a binary property under the name you chose. The MIME type is detected from the file name. |
The three list-style operations change the item count, so a node downstream of log, reflog or listConfig sees one item per record rather than one per input item.
Reference the results downstream by expression, e.g. {{ $json.success }}, {{ $json.hash }} after a log, or {{ $json.fileSize }} after Show File.
Usage Examples
- Clone a repository from GitHub
- Commit and push changes to a remote repository
- View the commit log for a repository
- Check the status of a git repository
- Create a new branch and switch to it
- Read a file from a specific git commit as binary data
- Set git user.name and user.email config
- Create a tag for the current commit
Example Configuration
Clone a repository into the workspace:
{
"type": "git",
"parameters": {
"operation": "clone",
"sourceRepository": "https://github.com/user/repo.git",
"repositoryPath": "workspace/my-project",
"authentication": "gitPassword"
}
}
Stage two files:
{
"type": "git",
"parameters": {
"operation": "add",
"repositoryPath": "workspace/my-project",
"pathsToAdd": "src/file.js,README.md"
}
}
Commit, switching to a branch and staging a folder first:
{
"type": "git",
"parameters": {
"operation": "commit",
"repositoryPath": "workspace/my-project",
"message": "Add new feature implementation",
"options": {
"branch": "feature-branch",
"pathsToAdd": "src/"
}
}
}
Push to a named remote:
{
"type": "git",
"parameters": {
"operation": "push",
"repositoryPath": "workspace/my-project",
"authentication": "gitPassword",
"options": {
"branch": "main",
"targetRepository": "origin"
}
}
}
Read the last ten commits touching one file:
{
"type": "git",
"parameters": {
"operation": "log",
"repositoryPath": "workspace/my-project",
"returnAll": false,
"limit": 10,
"options": {
"file": "src/app.js"
}
}
}
Create a branch off main and track it on the remote:
{
"type": "git",
"parameters": {
"operation": "switchBranch",
"repositoryPath": "workspace/my-project",
"branchName": "new-feature",
"options": {
"createBranch": true,
"startPoint": "main",
"force": false,
"setUpstream": true,
"remoteName": "origin"
}
}
}
Set the commit identity on a repository:
{
"type": "git",
"parameters": {
"operation": "addConfig",
"repositoryPath": "workspace/my-project",
"key": "user.email",
"value": "developer@example.com",
"options": {
"mode": "set"
}
}
}
Read a file out of a branch as binary data:
{
"type": "git",
"parameters": {
"operation": "showFile",
"repositoryPath": "workspace/my-project",
"filePath": "src/config.json",
"ref": "main",
"binaryPropertyName": "fileContent"
}
}
Tag the current commit:
{
"type": "git",
"parameters": {
"operation": "tag",
"repositoryPath": "workspace/my-project",
"name": "v1.0.0"
}
}
A three-node development flow — clone, commit, push. First, clone:
{
"type": "git",
"parameters": {
"operation": "clone",
"sourceRepository": "https://github.com/user/repo.git",
"repositoryPath": "workspace/project",
"authentication": "gitPassword"
}
}
Then stage everything and commit:
{
"type": "git",
"parameters": {
"operation": "commit",
"repositoryPath": "workspace/project",
"message": "Update implementation",
"options": {
"pathsToAdd": "."
}
}
}
Then push the branch:
{
"type": "git",
"parameters": {
"operation": "push",
"repositoryPath": "workspace/project",
"authentication": "gitPassword"
}
}
Error Handling
| Mode | Behavior |
|---|---|
| stop | Halts workflow on first error |
| continue | Skips failed items, passes successful ones through |
| errorPort | Routes failed items to Error output port |
Tips
Execute local git operations (clone, commit, push, pull, log, status, branch, tag, etc.) on repositories within the workspace directory. The showFile operation reads file content as binary data.
Behavior notes
- Repositories live in the workspace directory. Every path parameter is resolved inside
workspace/; a path that escapes it is rejected. Clone first, then point the other operations at the same path. - Authentication applies to Clone and Push only. Set it to
gitPasswordon those two operations to use the configured credential; the other operations run against the local repository and need no credential. Push Tags also uses the credential when one is configured. - Credentials never reach the item. When a remote URL is written into the repository or read back by List Config, the user name and password are stripped before anything is output.
- Only three config keys can be set. Add Config accepts
user.email,user.nameandremote.origin.url, andremote.origin.urlmust be anhttps://URL. - Commit can stage for you. Setting Paths to Add in the commit Options stages those paths before committing; leave it empty and only what is already staged is committed.
- Commit’s Branch option creates the branch if it does not exist and sets it to track the remote, then commits there. Push’s Branch option switches to an existing branch without creating one.
- Max Concurrency defaults to 1 because parallel git commands on one repository conflict with each other. Raise it only when each item targets a different repository.
- Show File reads from history, not the working tree. It returns the file exactly as it exists at the given ref, so it works for commits and tags as well as branches.
Frequently asked questions
Which operations actually need credentials, and which don't?
Only Clone and Push reach out to a remote server, so only those two operations use the gitPassword credential. Push Tags will also use the credential if one is configured. Every other operation — commit, status, log, branch switching, and so on — works entirely against the local repository and requires no authentication at all.
Can I run multiple Git operations in parallel on the same repository?
No — Max Concurrency defaults to 1 precisely because parallel git commands on a single repository conflict with each other and can corrupt state. You can raise the concurrency limit only when each workflow item is targeting a completely different repository path inside the workspace.
How do I make sure a file ends up staged before I commit?
You have two options. You can run a separate Add operation to stage files, then follow it with a Commit. Alternatively, the Commit operation has a Paths to Add option: fill that in and the node stages those paths for you immediately before committing, so you can skip the explicit Add step.
What happens if I try to read a remote URL back with List Config — will it expose the password?
No. The node strips credentials from remote URLs before writing them into the repository and before returning any config output. Any URL you see in List Config output will have the username and password removed.
I want to read a file as it existed at a specific commit or tag. Is that possible?
Yes — use the Show File operation. It reads file content directly from git history at a ref you specify (a commit hash, tag, or branch name) and returns the data as binary output. It does not touch the working tree, so it works without checking out that ref.
Build with the Git node
Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need Git Password credentials first.
Open BusyBotLast updated . Spotted something wrong? Tell us.