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?
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?
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
git fetch origin branch
fetches updates from origin for a single branch.
git remote update origin
fetches updates from origin for all branches.