How can I edit my .git/config
file?
Apparently, my heroku
remote is set to something other than heroku
; as a result, I am unable to properly deploy my Rails app on Heroku. However, I can't find how to edit it to set it to the right thing.
Where can I find the config file? I can't find a file named that way in my repository or in my Git folder installation. Where should I search for it and can I edit it?
$ git remote -v
heroku https://git.heroku.com/pure-plateau-4958.git (fetch)
heroku https://git.heroku.com/pure-plateau-4958.git (push)
origin [email protected]:vike27/sciencevest100.git (fetch)
origin [email protected]:vike27/sciencevest100.git (push)
however heroku open doesn't work and heroku support says it is because of the previous afformentioned error in my .git/config file
I am on Windows8
If you want to check your configuration settings, you can use the git config --list command to list all the settings Git can find at that point: $ git config --list user.name=John Doe user.
Your remotes are usually set in your local config file.
The file can be found end edited here: .git/config
.
You can edit that directly or use the git config
config to set/get entries in it.
git help config
for details.
How can I edit my
.git/config
file?
Don't, unless you know exactly what you're doing. To modify your Git config, you should instead strive to use Git commands only. One reason for avoiding to edit the config file manually is that you may end up corrupting it inadvertently.
Apparently, my
heroku
remote is set to something other thanheroku
[...]
If I understand your problem correctly, you want to change the URL associated with the remote called heroku
. First, check what the URL currently used is, by running
git remote -v
This command should list the fetch
and push
URLs associated with the remote heroku
. If you find that those URLs are indeed incorrect, then run
git remote set-url heroku <new-url>
to set the URL of your heroku
remote to <new-url>
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With