1

When I first time installed git I used a wrong link to a repository.

I can see that in my config file found in .git folder in my Android Studio project has these settings:

ignorecase = true
[remote "origin"]
url = https://github.com/NrkSensors/Android.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch]
autosetuprebase = always
[branch "master"]
rebase = true
remote = origin
merge = refs/heads/master
[remote "github"]
url = https://github.com/Muuddz/AndroidApp.git
fetch = +refs/heads/*:refs/remotes/github/*

I want this removed https://github.com/Muuddz/AndroidApp.git because this repository dosn't exist anymore. I can't find any ways in Android Studio to change it. What should I remove from the file to not corrupt anything?

2 Answers2

0

If you just want to change your remote url then you cant do it from terminal as follows

git remote set-url origin "your remote url"

EDIT : if you want to remove that wrong url, just execute following command

git remote remove github
Nikhil
  • 3,711
  • 8
  • 32
  • 43
0

open your config file vi .git/config and delete line

[remote "github"] url = https://github.com/Muuddz/AndroidApp.git fetch = +refs/heads/*:refs/remotes/github/*

then use

git remote set-url origin "https://github.com/NrkSensors/Android.git"

And world would be happy again!

Gupta
  • 8,882
  • 4
  • 49
  • 59