Forrest logo
back to the dolt tool

dolt-branch:tldr:5782c

dolt-branch: Display the name of the current branch.
$ dolt branch --show-current
try on your machine

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.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the dolt tool