Skip to content

Latest commit

 

History

History
32 lines (27 loc) · 1.78 KB

branch.md

File metadata and controls

32 lines (27 loc) · 1.78 KB
title sidebar_label
branch
branch

Create a branch

param type [= default] description
core string = 'default' The plugin core identifier to use for plugin injection
fs [deprecated] FileSystem The filesystem containing the git repo. Overrides the fs provided by the plugin system.
dir string The working tree directory path
gitdir string = join(dir,'.git') The git directory path
ref string What to name the branch
checkout boolean = false Update HEAD to point at the newly created branch
return Promise<void> Resolves successfully when filesystem operations are complete

Example Code:

await git.branch({ dir: '$input((/))', ref: '$input((develop))' })
console.log('done')
<script> (function rewriteEditLink() { const el = document.querySelector('a.edit-page-link.button'); if (el) { el.href = 'https://github.com/isomorphic-git/isomorphic-git/edit/master/src/commands/branch.js'; } })(); </script>