Reference · Tools

Git

Execute git version control operations on local repositories.

Action (binary) Development v1 Binary data

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

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool requires Git Password credentials. See the Credentials Guide for setup instructions.

Operations

OperationValueDescription
AddaddAdd a file or folder to commit
Add ConfigaddConfigAdd configuration property
ClonecloneClone a repository
CommitcommitCommit files or folders to git
FetchfetchFetch from remote repository
List ConfiglistConfigReturn current configuration
LoglogReturn git commit history
PullpullPull from remote repository
PushpushPush to remote repository
Push TagspushTagsPush tags to remote repository
ReflogreflogReturn reference log
Show FileshowFileRead file content from git repository at a specific ref as binary data
StatusstatusReturn status of current repository
Switch BranchswitchBranchSwitch to a different branch
TagtagCreate a new tag

Parameters

Add (add)

ParameterTypeRequiredDefaultDescription
Repository Path (repositoryPath)stringYesLocal path of the git repository to operate on. Must be within the workspace/ directory. Supports expressions.
Paths to AddstringYesComma-separated list of paths (absolute or relative to Repository Path) of files or folders to add. Supports expressions.

Add Config (addConfig)

ParameterTypeRequiredDefaultDescription
Repository Path (repositoryPath)stringYesLocal path of the git repository to operate on. Must be within the workspace/ directory. Supports expressions.
KeyoptionsYesName of the configuration key to set. Restricted to allowed keys for security.
Options: user.email, user.name, remote.origin.url
ValuestringYesValue of the configuration key to set. Supports expressions.
OptionscollectionNo{}Additional options for the addConfig operation.
— ModeoptionsNosetAppend setting rather than set it in the local config.
Options: append, set

Clone (clone)

ParameterTypeRequiredDefaultDescription
New Repository Path (repositoryPath)stringYesLocal path to clone the git repository into. Must be within the workspace/ directory. Supports expressions.
Source RepositorystringYesThe URL or path of the repository to clone. Supports expressions.
AuthenticationoptionsNononeThe authentication method to use.
Options: gitPassword (use the configured Git Password credential), none

Commit (commit)

ParameterTypeRequiredDefaultDescription
Repository Path (repositoryPath)stringYesLocal path of the git repository to operate on. Must be within the workspace/ directory. Supports expressions.
MessagestringNoThe commit message to use. Supports expressions like {{ $json.message }}.
OptionscollectionNo{}Additional options for the commit operation.
— BranchstringNoThe branch to switch to before committing. If empty, commits to current branch.
— Paths to AddstringNoComma-separated list of paths (absolute or relative to Repository Path) to include in commit. If not set, all staged files are committed.

Fetch (fetch)

ParameterTypeRequiredDefaultDescription
Repository Path (repositoryPath)stringYesLocal path of the git repository to operate on. Must be within the workspace/ directory. Supports expressions.

List Config (listConfig)

ParameterTypeRequiredDefaultDescription
Repository Path (repositoryPath)stringYesLocal path of the git repository to operate on. Must be within the workspace/ directory. Supports expressions.

Log (log)

ParameterTypeRequiredDefaultDescription
Repository Path (repositoryPath)stringYesLocal path of the git repository to operate on. Must be within the workspace/ directory. Supports expressions.
Return AllbooleanNofalseWhether to return all results or only up to a given limit.
LimitnumberNo100Max number of results to return. (shown when Return All is false)
OptionscollectionNo{}Additional options for the log operation.
— FilestringNoThe path (absolute or relative to Repository Path) of a file or folder to get the history of.

Pull (pull)

ParameterTypeRequiredDefaultDescription
Repository Path (repositoryPath)stringYesLocal path of the git repository to operate on. Must be within the workspace/ directory. Supports expressions.

Push (push)

ParameterTypeRequiredDefaultDescription
Repository Path (repositoryPath)stringYesLocal path of the git repository to operate on. Must be within the workspace/ directory. Supports expressions.
AuthenticationoptionsNononeThe authentication method to use.
Options: gitPassword (use the configured Git Password credential), none
OptionscollectionNo{}Additional options for the push operation.
— BranchstringNoThe branch to switch to before pushing. If empty, pushes current branch.
— Target RepositorystringNoThe URL or path of the repository to push to.

Push Tags (pushTags)

ParameterTypeRequiredDefaultDescription
Repository Path (repositoryPath)stringYesLocal path of the git repository to operate on. Must be within the workspace/ directory. Supports expressions.

Reflog (reflog)

ParameterTypeRequiredDefaultDescription
Repository Path (repositoryPath)stringYesLocal path of the git repository to operate on. Must be within the workspace/ directory. Supports expressions.
Return AllbooleanNofalseWhether to return all results or only up to a given limit.
LimitnumberNo100Max number of results to return. (shown when Return All is false)
OptionscollectionNo{}Additional options for the reflog operation.
— ReferencestringNoThe reference to show the reflog for (e.g., HEAD, branch name). Leave empty for HEAD.

Show File (showFile)

ParameterTypeRequiredDefaultDescription
Repository Path (repositoryPath)stringYesLocal path of the git repository to operate on. Must be within the workspace/ directory. Supports expressions.
File PathstringYesThe path of the file within the repository to read. Supports expressions.
RefstringNoHEADThe git reference (branch, tag, commit hash) to read the file from. Defaults to HEAD. Supports expressions.
Binary PropertystringNodataName 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)

ParameterTypeRequiredDefaultDescription
Repository Path (repositoryPath)stringYesLocal path of the git repository to operate on. Must be within the workspace/ directory. Supports expressions.

Switch Branch (switchBranch)

ParameterTypeRequiredDefaultDescription
Repository Path (repositoryPath)stringYesLocal path of the git repository to operate on. Must be within the workspace/ directory. Supports expressions.
Branch NamestringYesThe name of the branch to switch to. Supports expressions.
OptionscollectionNo{}Additional options for the switchBranch operation.
— Create Branch If Not ExistsbooleanNotrueWhether to create the branch if it does not exist.
— Start PointstringNoThe 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 SwitchbooleanNofalseWhether to force the branch switch, discarding any local changes.
— Set UpstreambooleanNofalseWhether to set up tracking to a remote branch when creating a new branch. (shown when Create Branch If Not Exists is true)
— Remote NamestringNooriginThe name of the remote to track. (shown when Create Branch If Not Exists is true and Set Upstream is true)

Tag (tag)

ParameterTypeRequiredDefaultDescription
Repository Path (repositoryPath)stringYesLocal path of the git repository to operate on. Must be within the workspace/ directory. Supports expressions.
Tag NamestringYesThe name of the tag to create. Supports expressions.

All Operations

ParameterTypeRequiredDefaultDescription
Max ConcurrencynumberNo1Maximum 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.

OperationOutput
add, addConfig, clone, commit, fetch, pull, push, pushTags, tagOne item with success: true added.
switchBranchOne item with success: true and branch (the branch now checked out).
statusOne 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.
listConfigFans 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.
logFans out — one output item per commit, each carrying the commit’s own fields, including its hash, date, message and author.
reflogFans 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.
showFileOne 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

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes 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 gitPassword on 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.name and remote.origin.url, and remote.origin.url must be an https:// 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 BusyBot

Last updated . Spotted something wrong? Tell us.