Description

n8n-nodes-extended-git
This repo helps you get started building your own custom integrations for n8n. It includes the node linter and other dependencies.
This repository also provides a Git Extended node that lets you run Git commands directly from your workflows.
To make your custom node available to the community, you must create it as an npm package, and submit it to the npm registry.
Prerequisites
You need the following installed on your development machine:
- git
- Node.js and pnpm. Minimum version Node 20. You can find instructions on how to install both using nvm (Node Version Manager) for Linux, Mac, and WSL here. For Windows users, refer to Microsoft's guide to Install NodeJS on Windows.
- Install n8n with:
npm install n8n -g - Recommended: follow n8n's guide to set up your development environment.
Using this starter
These are the basic steps for working with the starter. For detailed guidance on creating and publishing nodes, refer to the documentation.
- Generate a new repository from this template repository.
- Clone your new repo:
git clone https://github.com/<your organization>/<your-repo-name>.git - Run
npm ito install dependencies. - Open the project in your editor.
- Add your node and credential files to
/nodesand/credentials. - Update the
package.jsonto match your details. - Run
npm lintto check for errors ornpm lintfixto automatically fix errors when possible. - Test your node locally. Refer to Run your node locally for guidance.
- Replace this README with documentation for your node. Use the README_TEMPLATE to get started.
- Update the LICENSE file to use your details.
- Publish your package to npm.
Git Extended node
This repository includes a Git Extended node located in /nodes/GitExtended. It lets you execute common Git commands inside your workflows. The node supports operations like clone, init, add, commit, push, lfsPush, pull, status, log, switch, checkout, merge, applyPatch, branches, createBranch, deleteBranch, renameBranch, commits, fetch, rebase, cherryPick, revert, reset, stash, tag, and configUser.
The push operation includes a Force Push option that appends --force to the command when enabled.
Enable Push LFS Objects to run git lfs push --all automatically before pushing.
Enable Skip LFS Push to set GIT_LFS_SKIP_PUSH=1 and skip uploading LFS objects during the push.
Enable Skip LFS Smudge to set GIT_LFS_SKIP_SMUDGE=1 when cloning, pulling, or fetching so Git LFS objects are not downloaded.
Use lfsPush to manually upload Git LFS objects when the remote requires them.
Enable Skip Stdout to discard command output and avoid stdout maxBuffer length exceeded errors when commands produce large output.
The Remote parameter accepts either a remote name (such as origin) or a full repository URL. This lets you push or pull from a configured remote or directly specify another repository.
Example usage:
Remote: origin
Branch: main
Remote: https://github.com/example/repo.git
Branch: main
Every operation requires a Repository Path parameter that defines the directory from which the Git command is executed. For clone, the repository will be created inside this directory.
The applyPatch operation uses git apply to apply a patch file. You can provide the patch text directly or specify a path to a patch file. Enable the Binary option when applying binary patches.
Running Git commands
The node relies on the git binary available on the machine running n8n. Make sure git is installed and accessible from the command line.
More information
Refer to our documentation on creating nodes for detailed information on building your own nodes.