Y
Y
Yaroslav2018-12-04 20:40:08
git
Yaroslav, 2018-12-04 20:40:08

Is it possible to get information on a branch on a remote server without fetch?

Actually, subject.
For example, how to get the name of the last commit in a branch on the server from the console? Not fetching

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
jcmvbkbc, 2018-12-05
@YarkoDzech

Is it possible to get information on a branch on a remote server without fetch?

Limited. See git ls-remote .
You can find the hash:
$ git ls-remote origin refs/heads/master
2595646791c319cadfdbf271563aac97d0843dc7        refs/heads/master

A
aol-nnov, 2018-12-04
@aol-nnov

No way. Through fetch, you deliver the state of the remote repository to yourself. Then you can combine this state with your local state or not.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question