git branch is a Git command used to list, create, or delete branches in a Git repository. When used with no arguments, it lists all existing branches in the repository.
Here’s an example of how
git branch can be used:
$ git branch
In this example, the
git branch command is used to list all the branches in the repository. The
* character indicates the currently checked out branch, which is
master in this case. The other branches listed are
You can also use
git branch with additional arguments to create or delete branches. For example, to create a new branch called
new-feature, you can run:
$ git branch new-feature
And to delete a branch called
old-feature, you can run:
$ git branch -D old-feature
I hope this helps! Let me know if you have any other questions.