creategitbranch
July 18, 2026 · View on GitHub
Create a new local git branch, optionally check it out, and optionally attach an EXISTING infobase (application, from get_applications) to the new branch's context. Rejects a name that already exists (use switch_git_branch instead). Full parameters and examples: call get_tool_guide('create_git_branch').
Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| projectName | yes | string | EDT project whose git repository to branch (required). |
| branch | yes | string | New branch's short name (required); must not already exist. |
| startPoint | — | string | Existing branch, ref, or commit to start the new branch from. Optional; defaults to the current HEAD. |
| checkout | — | boolean | Check out the new branch immediately after creating it (bounded background Job, up to 120 s). Default false. |
| applicationId | — | string | Optional: application id from get_applications to attach to the new branch's context (the base is FOR this branch). |
| setDefault | — | boolean | Only with applicationId: also make it the DEFAULT infobase for the new branch's context. Default false. |
Guide
Create a new local git branch - the non-UI sibling of EDT's own "New Branch" command - optionally check it out immediately, and optionally attach an EXISTING infobase to the new branch's context in the same call.
Parameters
branchis the new branch's SHORT name; it must NOT already exist (checked viaRepository.findRefbefore anything else runs - a name that resolves to an existing local branch, remote-tracking branch, or tag is rejected, naming the ref it collided with).startPoint(optional) is an existing branch, tag, or commit to branch from; defaults to the current HEAD. An unresolvable value is rejected naming it.checkout(default false): after creating the branch, check it out immediately via the same bounded background Jobswitch_git_branchuses (up to 120 s).applicationId(optional, fromget_applications): attach this EXISTING infobase to the NEW branch's context - equivalent to callingset_branch_infobaseright after this call, but in one round trip. The base is bound to the branch's context regardless of whethercheckoutwas also requested.setDefault(only meaningful withapplicationId, default false): also make the attached application the branch context's default infobase.
What happens on success
Once branch itself is created, that is FINAL - nothing after it can turn the result into a total failure. The result is:
{ "success": true, "branch": "feature/x", "created": true, "checkedOut": true,
"startPoint": "HEAD", "bound": { "infobases": ["MyBase"], "defaultInfobase": "MyBase" } }
checkedOutistrueonly whencheckoutwas requested AND the checkout completed cleanly. If checkout was requested but timed out, was interrupted, or left conflicts,checkedOutisfalseandmessageexplains why - the branch still exists, it is simply not the one checked out.boundis present only whenapplicationIdwas given AND the binding succeeded; a resolution or association failure (application not found, no infobase reference, association-manager error) instead appends tomessageand omitsbound- again, the branch itself is unaffected.startPointechoes what was actually used: the given value, or the literal"HEAD"when omitted.
Notes & gotchas
- Not gated by the destructive-consent dialog. Creating a local branch is reversible (delete it, or simply never use it) and never opens a 1C infobase connection.
- The already-exists pre-check runs BEFORE any mutation, so a call against a colliding name is a pure no-op (nothing is created, nothing is touched) - safe to retry with a different name.
- If you only need to create the branch (no checkout, no binding), leave
checkoutandapplicationIdout; the call is then a thin wrapper overGit.branchCreate(). - To bind an infobase to a branch WITHOUT creating it (e.g. the branch already exists), use
set_branch_infobaseinstead. - Combine with
switch_git_branchfor the general "switch to an existing branch" case - this tool is specifically for branches that do not exist yet.
Generated from the live MCP server (get_tool_guide) by docs/generate_tool_docs.py. Do not edit this file. Edit the tool's description/schema in its Java source and its guide body in mcp/bundles/com.ditrix.edt.mcp.server/guides/<tool>.md.