user2225190
user2225190

Reputation: 549

How to get the correct GIT remote repository url

Please let me know how to get the remote url of a git branch that I did not clone to my local.

'git remote -v' is listing only the branch that I cloned this branch from and not any other remote branch urls.

I am facing problems to checkout from other remote branches and getting the error as 'does not appear to be a git repository'

Upvotes: 1

Views: 781

Answers (1)

Chao Luo
Chao Luo

Reputation: 2696

git remote -v

it will show like this.

origin xx@xxx(fetch)

origin xx@xxx(push)

and then

git fetch origin (or other repo name show above)

git branch -a # this will show all the branches.

Upvotes: 2

Related Questions