LoginSignup
0
1

More than 3 years have passed since last update.

【Git】git megerでfatal: No remote for the current branch.と言われた時の対処法

Posted at

症状

「git add -A」や「git commit」などを行い、「git merge」を実施したところ、下記のエラーが表示されました。

git merge
fatal: No remote for the current branch.

翻訳すると、「fatal: 'origin/master' does not appear to be a git repository。致命的:現在のブランチのリモートはありません。」となりました。
リモートリポジトリがないため、表示されてしまったようです。

解決方法

リモートリポジトリを設定したら問題なくできました。

#リモートリポジトリを設定
git remote add origin https://github.com/ユーザー名/リポジトリ名.git
 

参考

Railsチュートリアル
https://railstutorial.jp/chapters/beginning?version=6.0#sec-git_setup

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1