This question has already been answered:

I created my own repository-1 (gulp-project template) on github, I didn’t fork it.

Now I am starting a new project, and in the webstorm I clone this repository-1 with a template, rename it, and work with it as a separate, but already repository-2.

If I commit, then the commits will fall into the repository-1 of the template, and I need something in the new repository-2 (working).

How in this case is it right to do?

Marked as a duplicate by the participants Yuriy SPb , Community Spirit 12 Apr '16 at 15:55 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

    1 answer 1

    It is necessary to change the url of the remote repository ( remote in git terminology):

    $ git remote set-url origin url-нового-репозитория 

    here it is assumed that the default name of the remote repository - origin - you have not changed.

    An example from github-ovsky documentation .


    If I commit, then commits will fall into the repository-1

    you will actually commit (in any case) to a local repository. but where these commits will be sent with the push command is what determines the url of the remote repository.