Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git remote -v explanation

I'm using git remote -v to see my remote repository.

myname@DESKTOP-0SD47KB MINGW64 ~/Desktop/maevenNetbeans/MyProject(master)
    $ git remote -v
    origin  https://github.com/Myname/MyProject.git (fetch)
    origin  https://github.com/Myname/MyProject.git (push)
    origin2 https://github.com/Myname/MyProject(fetch)
    origin2 https://github.com/Myname/MyProject(push)

When i created the repository, i linked only one remote repository.

My question is why i'm getting two linked remote repisotory?

What is the meaning of the fetch and push keywords in this context. I know that pushing is for sending and fetching is for retrieving.

is the origin2 a local repository?

like image 328
xmen-5 Avatar asked Apr 07 '26 01:04

xmen-5


1 Answers

origin2 is simply the result of (possibly by mistake) a git remote add:

git remote add origin2 https://github.com/...

Since the URL is the same as origin, a git fetch will not fetch twice.

As commented, a simple git remote remove origin2 would rectify the issue.

like image 103
VonC Avatar answered Apr 10 '26 04:04

VonC