1

私は本当に厄介な問題を抱えています。すべてのアプリでherokuの以前のアカウントを削除してから、新しいアカウントを作成しました。gitにリモートブランチを追加したかったので、問題が発生しました。

git remote -v 
heroku  git@heroku.com:freezing-moon-116.git (fetch)
heroku  git@heroku.com:freezing-moon-116.git (push)
origin  git@gitbus.fiit.stuba.sk:laser_kn/laser_kn.git (fetch)
origin  git@gitbus.fiit.stuba.sk: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 = git@gitbus.fiit.stuba.sk:laser_kn/laser_kn.git
        fetch = +refs/heads/*:refs/remotes/origin/*

私の質問は、壊れたリモートHerokuリポジトリを削除して、新しいリポジトリを追加するにはどうすればよいですか?

どうも

4

1 に答える 1

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あなたがそこにあなたのリモコンを見つけるべきである可能性が最も高いのを見てください。

于 2012-12-03T22:33:51.263 に答える