Git branch operations — checkout, current branch, stash, create, delete.
Summary
Functions
Returns true if the given branch exists locally or remotely.
Checks out the main_branch of a repository, stashing uncommitted
changes first if necessary.
Creates a new branch.
Deletes a branch.
Returns the currently checked-out branch name.
Returns true if the repository has stash entries.
Returns the list of all local branches.
Stashes uncommitted changes if the working tree is dirty.
Restores stashed changes.
Pushes stash entries in a repository.
Functions
Returns true if the given branch exists locally or remotely.
Checks out the main_branch of a repository, stashing uncommitted
changes first if necessary.
Creates a new branch.
Deletes a branch.
Returns the currently checked-out branch name.
Returns true if the repository has stash entries.
Returns the list of all local branches.
Stashes uncommitted changes if the working tree is dirty.
Returns {:ok, {:stashed, branch}}, {:ok, :clean}, or {:error, reason}.
Restores stashed changes.
Pushes stash entries in a repository.
Options
:message— stash description (default:"auto-stash"):include_untracked— include untracked files (default:true)