rubygitgrit

Create a repo using Grit


Is there a way to create a branch in a repo using Grit? I can't seem to find a way in the docs nor is there any reference I can find on the web.


Solution

  • Given that some of Grit shells out already, and that Grit#method_missing explicitly shells out, it looks like you could do:

    git.branch({},"branchname")
    git.checkout({},"branchname") # If you like
    

    Set extra options as appropriate.