Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次のブランチがあります
私の問題は、masterブランチをphotosブランチにマージし、同じファイルに変更を加えたために競合が発生したことです。次にreset --hard HEAD、photos最初に作成したときのデフォルトに戻ります。photosブランチとマージする前に、ブランチを最後のコミットに戻す方法はmaster?
master
photos
reset --hard HEAD
使いたいのですgit checkout HEADが、ブランチの履歴やログ git が見つかりませんphotos。
git checkout HEAD
を調べgit reflogて、そのコミットが見つかるかどうかを確認してgit reset --hard <commit>から、ブランチを復元してみてください。
git reflog
git reset --hard <commit>
ブランチが指していgit reflog photosた場所への変更を確認できます。photosマージ前のものを見つけて、reset --hard代わりにHEAD.
git reflog photos
reset --hard
HEAD