Actions26
Overview
The node "Git Extended" allows running various Git commands directly from n8n workflows by executing Git CLI commands on a specified local repository path. It supports a wide range of Git operations such as checking status, cloning repositories, committing changes, pushing/pulling branches, managing branches and tags, applying patches, and more.
This node is beneficial in automation scenarios where you want to integrate Git version control actions into your workflow without manually running Git commands. For example:
- Automatically committing and pushing code changes after a build process.
- Cloning a repository and checking its status before deployment.
- Managing branches or tags programmatically as part of CI/CD pipelines.
- Applying patches or rebasing branches triggered by external events.
Properties
| Name | Meaning |
|---|---|
| Repository Path | Filesystem path to run the Git command from. For clone, the repository will be created inside this path. |
| Skip Stdout | Whether to ignore command output to avoid maxBuffer errors (useful for large outputs). |
Output
The node outputs JSON data containing the standard output (stdout) and standard error (stderr) strings resulting from the executed Git command, unless Skip Stdout is enabled. In that case, the output JSON is empty.
Output structure example when not skipping stdout:
{
"stdout": "<trimmed command output>",
"stderr": "<trimmed error output>"
}
If Skip Stdout is true, the output JSON will be {}.
No binary data output is produced by this node.
Dependencies
- Requires Git CLI installed and accessible in the system environment where n8n runs.
- Uses Node.js child process execution to run Git commands.
- For some operations involving authentication (clone, push, pull), an API key credential or custom username/password can be used to embed credentials into the Git URL.
Troubleshooting
- MaxBuffer Errors: Large Git command outputs may cause buffer overflow errors. Enable the
Skip Stdoutproperty to avoid capturing output and prevent these errors. - Unsupported Operation: If an invalid operation name is provided, the node throws an error indicating unsupported operation.
- Authentication Failures: When using authentication, ensure valid credentials are provided. Incorrect usernames or passwords embedded in URLs may cause Git command failures.
- File System Path Issues: The
Repository Pathmust be correct and accessible. Invalid paths or permission issues will cause command failures. - Temporary Patch File Cleanup: For patch application, temporary files are created and deleted automatically. Failure to delete may indicate file system permission problems.