Search code examples
githubgit-pushgit-remote

Git hub switch upload repository


I am developing two apps in Django.

I developed the first (app1) and uploaded it on github (https://github.com/myprofile/app1). Then, in another separate folder, I developed the second (app2) and uploaded it on another repository on github (https://github.com/myprofile/app2).

Now I modified app1 and I want to upload it on its repository on github.

If I push my files right now, they will fill the app2 repository on github.

How do I tell my prompt to select the repository of app1 as destination of my push?

I think I need something like

git remote ??? origin https://github.com/myprofile/app1

Solution

  • The problem does not exists, since, as one changes the current directory in the command prompt, the url of the repository destination of the files that will be uploaded is already set, because before the repository was associated with the local directory before thanks to the commands

    git init
    git remote add origin https://github.com/myprofile/app1.git