Reputation: 11391
I want to get the refs for a remote git repo (I am not interested in the code).
I am connecting over ssh. What commands would I need to execute to just download the refs information?
Upvotes: 0
Views: 76
Reputation: 1367
You probably want to run some version of ls-remote
By default it only shows you the branches:
git ls-remote ssh://user@server/path/to/repo.git
use -t
to show the tags:
git ls-remote -t ssh://user@server/path/to/repo.git
add -h
to show the branches also:
git ls-remote -t -h ssh://user@server/path/to/repo.git
Upvotes: 2
Reputation: 94397
git fetch origin branch
fetches updates from origin for a single branch.
git remote update origin
fetches updates from origin for all branches.
Upvotes: -1