Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Check if any remote upstream exists for a given local repository offline git

Tags:

git

I have a local git repository and needs to check if any upstream is linked with this repository. Since I don't need any other details, the command should be lightweight and should work offline.

The command

git ls-remote

cannot be used, since it checks online. I need a command that doesn't use any network operation.

like image 684
Sai Tarun Avatar asked Nov 06 '22 21:11

Sai Tarun


1 Answers

git remote -v will list a repository's known remote repositories. It doesn't require a network connection (just tested it myself).

like image 84
Scott Newson Avatar answered Nov 15 '22 06:11

Scott Newson