数週間前にプロジェクトをフォークしました。メイン リポジトリはプライベート サーバー上にあります。
$ # on gitserver.com
$ git clone --bare main.com:myproject
アップストリーム リポジトリを追加し、新しいデータを取得しました。
$ # on desktop.com
$ git clone gitserver.com:myproject
$ git remote add upstream main.com:myproject
$ git fetch upstream
アップストリーム ブランチを自分のリモート リポジトリにプッシュしようとすると、アップストリームには存在するがオリジンには存在しないブランチのエラーが発生します。
$ git push origin refs/remotes/upstream/BRANCH_A:BRANCH_A
Everything up-to-date
$ git push origin refs/remotes/upstream/BRANCH_B:BRANCH_B
error: unable to push to unqualified destination: BRANCH_B
The destination refspec neither matches an existing ref on the remote nor
begins with refs/, and we are unable to guess a prefix based on the source ref.
error: failed to push some refs to '...'
このリモートブランチをオリジンに作成してプッシュするにはどうすればよいですか?