Toka A. Amin
Toka A. Amin

Reputation: 166

Can't push an android studio project into github

I had some existing repositories on github and i deleted them, now i want to reshare my project into github the android studio but i get this error

JustJava2: failed with error: fatal: repository not found

How can i make android studio to create a new repository and push the project their?

Upvotes: 0

Views: 2509

Answers (2)

Marina Liu
Marina Liu

Reputation: 38136

  1. First, please check the github repo URL in android studio.

    Android studio -> click Terminal -> input the command git remote –v to check the github repo URL you were working.

    enter image description here

    Assume the URL you found is https://github.com/username/r2 (or https://github.com/username/r2.git).

  2. Then create a new repo with the same name (such as r2).

    Click + icon -> New repository -> name the same repo name (r2) as you found in above step -> Create repository.

    enter image description here

    If you have already create a new repo with different name or there is no output for git remote –v in the first step, you can set remote url in android studio terminal by git remote set-url origin <the new created repo URL>.

  3. Now you can push your project successful in android studio.

Upvotes: 1

Have you created a new remote repository and updated the local repos remote url? You can see how to change the remote url from the command line here

Upvotes: 0

Related Questions