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?

1
  • 1
    @VKatz it worked by deleting this from line from the file Commented Sep 23, 2016 at 10:19

2 Answers 2

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 
Sign up to request clarification or add additional context in comments.

Comments

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!

Comments