0
0

More than 1 year has passed since last update.

error: the requested upstream branch 'リモート場所名/リモートブランチ名' does not exist

Last updated at Posted at 2022-04-25
error: the requested upstream branch 'origin/kame' does not exist

リモートブランチとしてorigin/kameは間違いなくあるのにエラー発生

スクリーンショット 2022-04-25 11 28 04

参考までに↓

error: the requested upstream branch 'リモートの場所名/リモートブランチ名' does not exist

大体↓みたいに表示される

error: the requested upstream branch 'origin/リモートブランチ名' does not exist

↓今回の場合だとこんな感じで表示された

error: the requested upstream branch 'origin/kame' does not exist
hint: 
hint: If you are planning on basing your work on an upstream
hint: branch that already exists at the remote, you may need to
hint: run "git fetch" to retrieve it.
hint: 
hint: If you are planning to push out a new local branch that
hint: will track its remote counterpart, you may want to use
hint: "git push -u" to set the upstream config as you push.

翻訳すると

error: 要求された上流ブランチ 'origin/kame' が存在しません。
のヒントがあります。
hint: リモート側に既に存在する上流ブランチをもとに作業を進めようと思っている場合。
hint: リモート側に既に存在するブランチをベースにする場合、以下の作業が必要になります。
hint: それを取得するために "git fetch" を実行します。
hint 
hint: 新しいローカルブランチをプッシュしようと考えている場合。
hint: がリモートのブランチを追跡する場合、次のようにします。
hint: "git push -u" を使ってプッシュ時に上流側の設定を行います。

原因

ローカルでリモートブランチのorigin/kameが見つからないよって言われてる

結論 

リモート(オンライン上)のリポジトリの最新状態をもらおう
ってことでfetch(git fetchとは?)

git fetch

これで

スクリーンショット 2022-04-25 11 28 27

ローカルでorigin/kameが認識されたので解決

0
0
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
0