How can I get remote git branches using Node.js?

I use this awesome library called Gift to fulfill all my standard git functions (pulling, reading, etc.). However, I cannot get deleted branches. I believe that the team git branch -rwill show me the branches, but the format, of course, cannot be read by the machine:

  origin/HEAD -> origin/master
  origin/dev
  origin/gh-pages
  origin/master

I am wondering how I can view all the remote branches that are in the repository.

Thank!

+5
source share
2 answers

To show all remote repositories for push and pull, try:

git remote -v

if you want more information about a specific remote device and how it relates to your current repository:

git remote show <remoteName>

+2
source

, , ,

git ls-remote origin
+3

All Articles