Question

I need to remove the remote variable called original for reuse. I know the variable is stored in the directory .git/.conf

This is what the terminal shows in Linux:

git remote add original6 https://github.com/perez/git.git
remote original6 already exists
Was it helpful?

Solution

git remote rename original6 newname

Should be the command you're looking for. This will allow you to rename the old remote to something else and add a new remote named original6.

If you want to delete the remote, type:

git config -e

And manually delete the listing from your config file.

There should be an entry that looks like this:

[remote "original6"]
    url = somebody@somewhere.com:something.git
    fetch = +refs/heads/......

If you delete those lines from your config, you should be good to go.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top