![Forrest logo](/images/logo.png)
dolt-branch:tldr:5782c
The command dolt branch --show-current
is used in the Dolt (a version-controlled database) command-line interface. It is used to retrieve the name of the currently active branch in the repository.
When executing this command, Dolt will display the name of the current branch on the console output. This can be useful when working with multiple branches in a repository and you want to confirm which branch you are currently on.
Here's an example:
$ dolt branch --show-current
main
In this example, the command will output "main" if the currently active branch is named "main." If the current branch is named "develop," it will display "develop" instead.
It's worth noting that if you run this command in a Dolt repository with detached head state (meaning you're not currently on a branch), you will receive an error message stating that no branch is currently checked out.