By default it lists local branches. If a 'remote' is specified, it lists the remote's branches. When listing remote branches, the HEAD branch is not filtered out, so it may be included in the list of results.
Note that specifying a remote does not actually contact the server and update the list of branches.
If you want an up-to-date list, first do a fetch to that remote.
(Which branch you fetch doesn't matter - the list of branches available on the remote is updated during the fetch handshake.)
Returns
Resolves successfully with an array of branch names.
List branches.
By default it lists local branches. If a 'remote' is specified, it lists the remote's branches. When listing remote branches, the HEAD branch is not filtered out, so it may be included in the list of results.
Note that specifying a remote does not actually contact the server and update the list of branches. If you want an up-to-date list, first do a
fetch
to that remote. (Which branch you fetch doesn't matter - the list of branches available on the remote is updated during the fetch handshake.)Returns
Resolves successfully with an array of branch names.
Example