question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

listRemoteBranches

See original GitHub issue

From #43

Currently, the listBranches function only looks for heads. Could you add a function that lists remote branches (or all branches?).

I think… add a listRemoteBranches function that takes a remote argument that defaults to undefined, and returns all remote branches, or if remote is specified returns just the branches in that remote.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
wmhiltoncommented, Jan 15, 2018

added in v0.2.0

1reaction
mojavelinuxcommented, Jan 14, 2018

I think you could avoid the extra function by allowing the remote property to be specified for listBranches.

const branches = await git.listBranches({
  fs,
  dir,
  remote: 'origin'
})

If you don’t specify a remote, then it returns local branches (as it does now).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Git List Remote Branches - freeCodeCamp
Git List Remote Branches · Command #1: git branch -r · Command #2: git ls-remote --heads · Command #3: git ls-remote · Command...
Read more >
Git: List Remote Branches - Career Karma
The git remote -r command lets you see a list of all the branches on a particular remote. If you need more information...
Read more >
Git Branches: List, Create, Switch to, Merge, Push, & Delete
List All Branches ; To see local branches, run this command: git branch ; To see remote branches, run this command: git branch...
Read more >
How do I list all remote branches in Git 1.7+? - Stack Overflow
Just run a git fetch command. It will pull all the remote branches to your local repository, and ...
Read more >
Git - Remote Branches - Git SCM
Remote references are references (pointers) in your remote repositories, including branches, tags, and so on. You can get a full list of remote...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found