他人からコピーしてもらったフォルダについて、元々入っていたブランチを削除し(otherとする)、自分で新たに作ったブランチ(myselfとする)を編集しました。
そこで、現在ターミナルで以下のコマンドを行った際の結果を示します。
git status On branch myself Your branch and 'origin/other' have diverged, and have 15 and 4 different commits each, respectively. (use "git pull" to merge the remote branch into yours) nothing to commit, working tree clean git branch myself master git branch --v * myself db9b8cc [ahead 15, behind 5] comment master da679bb [ahead 2, behind 1] master pull
git branch でみてもotherブランチは見つからず、またリモートリポジトリへのmyselfブランチへのpushも問題なく行えています。
このような状況の場合、どのようにすればよろしいでしょうか?
基本的にブランチは誤って作成した以外では削除しないでください
そうなんですか、気軽に削除してました。だめなのか
artistanさん、 git branch --all だとどうなりますか
git gcしてなければgit reflogで消したbranch復旧できるはず・・・
matobaaさん git branch --all だと、普通にリモートリポジトリの一覧が参照できます。otherブランチもmyselfブランチも別々です。
yumetodoさん git reflogで確認すれば、私が受け取る前にいじくった履歴が参照できます(otherブランチ上での操作)
まちがえた。artistanさん、 git branch --vv だとどうなりますか。
matobaaさん git branch --v の実施状況質問文に追加しました!
あれ、upstreamの情報がでるかと思ったのですが出ないですね……なんでだろう
git branch -avじゃないだろうか
回答1件
あなたの回答
tips
プレビュー