Same remote repo name for multiple remote repos

Say I have 3 projects that I’m working on all of which are on github – "project1", "project2", and "project3".

When creating a git for each individual project will there be any issues in naming each remote the same name?

For example,

git remote add origin

git remote add origin

git remote add origin

git push -u origin shouldn’t interfere if I’m working within the specific project directory right?

>Solution :

For each of your project you would be having a separate git repository right?
Which would have its own configuration and .git folder.

In that case, there is no issue in having remote named as origin in all your git repositories.
In fact, when you clone git repository from a remote, the origin remote is by default added by git pointing to the remote repository.

Leave a Reply