2012-12-03 78 views
1

我真的很烦人的问题,我删除了我以前的所有应用程序的heroku上,然后我创建了一个新的, 我想添加远程分支git,然后问题开始。heroku远程分支

git remote -v 
heroku [email protected]:freezing-moon-116.git (fetch) 
heroku [email protected]:freezing-moon-116.git (push) 
origin [email protected]:laser_kn/laser_kn.git (fetch) 
origin [email protected]:laser_kn/laser_kn.git (push) 

git remote rm heroku 
error: Could not remove config section 'remote.heroku' 


vim .git/config 
[core] 
     repositoryformatversion = 0 
     filemode = true 
     bare = false 
     logallrefupdates = true 
     ignorecase = true 
[remote "origin"] 
     url = [email protected]:laser_kn/laser_kn.git 
     fetch = +refs/heads/*:refs/remotes/origin/* 

我的问题是我如何删除那个破碎的远程heroku回购并添加一个新的?

THX

回答

0

由于git remote说明你的远程但.git/config没有,好像远程在另一个配置文件中定义。

引述man git config

FILES 
     If not set explicitly with --file, there are three files where git 
     config will search for configuration options: 

     $GIT_DIR/config 
      Repository specific configuration file. (The filename is of course 
      relative to the repository root, not the working directory.) 

     ~/.gitconfig 
      User-specific configuration file. Also called "global" 
      configuration file. 

     $(prefix)/etc/gitconfig 
      System-wide configuration file. 

看一看~/.gitconfig最有可能你会发现你的远程那里。