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.
私はGitの超初心者です。次のようにめちゃくちゃにしました:
マークしたこの混乱をどのように修正できますか? 新しいブランチを作成してそこにファイルを追加したかったのですが、何かをマージしました。
あなたが実行したはずのコマンドはgit merge [branchname].
git merge [branchname]
必要なコマンドはgit checkout -b [new_branchname] && git add [files...] && git commit.
git checkout -b [new_branchname] && git add [files...] && git commit
マージを元に戻すには、git reset HEAD^(1 回だけ) を使用します - を使用する必要がある場合があります--hard。
git reset HEAD^
--hard
それが意図したものでない場合は、質問を明確にしてください。