Reputation: 1802
Let's say I have a public repo on Github or some private server. If I had a clone of it to my machine, I could have ran commands like:
git branch
or
git-show
etc. in order to know more about a repository.
Obviously something like github has a GUI which you can use to get these information. I was wondering however if there is a way of getting these information from the command line without clone
ing it or ssh
ing to the remote machine and cd
ing to the directory hosting the repository.
Upvotes: 0
Views: 206
Reputation: 2004
A short answer is 'no' - there isn't a lot of interrogation you can do remotely unless, like Github, that repo also has a front-end UI that's accessible remotely.
@Dilettant is right - you might find something you want in git help ls-remote
If you did want a lighter-weight clone of the repo, the --bare
or --mirror
options copy only the git database (meaning you have no working directory). The latter is designed to be used with git remote update
to provide a more-or-less exact copy of the remote repo.
I don't know what it is you're looking to achieve, but remember that there's no reason you can't have multiple local clones of the same repo, and that you can fetch from one (including local clones) and push to another.
Upvotes: 2