USBスティックにgitリポジトリを作成したいとします。スティック上で、私は、コマンド「致命的:リモートオリジンは既に存在します。」の修正方法on 'git remote add'?
git init --bare MyRepo
を使用することにより、ノートパソコン(Ubuntuの14.04)上のリポジトリに裸のgitリポジトリを作成した私は、次のコマンド
git init
git add .
git commit -m 'first commit'
git remote add origin /media/alexander/Stick/MyRepo
を発行し、エラーを得た
fatal: remote origin already exists.
直前にスティックにgit repoを作成しましたが、エラーは発生しません(別のディレクトリを使用しています)。今私はこのエラーを取得します。 「git status」の出力は
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
です。何が問題になりますか?
間違ったディレクトリ(既に存在するGitリポジトリ内)で 'git init'を実行していないことを確認してください。 – axiac
[リモート原点は既に 'git push'に新しいリポジトリに存在します](https://stackoverflow.com/questions/1221840/remote-origin-already-exists-on-git-push-to-a-新しいリポジトリ) – phd