Branches & Tags Atoms
Branches
switchToBranch(name, { from? })
git checkout -b <name> — create and switch to a new branch. Optionally from a specific ref.
switchToBranch('feat/x') // from current HEADswitchToBranch('feat/x', { from: 'main' }) // from maincheckoutBranch(name)
git checkout <name> — switch to an existing branch.
createBranch(name, { from? })
git branch <name> — create without switching.
deleteBranch(name, { force? })
git branch -d / -D.
Tags
createTag(name, { message?, sha? })
Annotated when message is set, otherwise lightweight. Optionally at a specific sha.
createTag('v1.0.0', { message: 'Release v1.0.0' }) // annotatedcreateTag('v1.0.0-rc1') // lightweight at HEADcreateTag('v0.9.0', { sha: 'HEAD~5' }) // at a specific commitdeleteTag(name)
git tag -d <name>.