After I type ‘git reverse <hash of the commit from github>’ in the terminal of vscodium, it always throws this message at me.

Auto-merging app/build/posts.html
CONFLICT (content): Merge conflict in app/build/posts.html
error: could not revert 0cc6763... new blog
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git revert --continue".
hint: You can instead skip this commit with "git revert --skip".
hint: To abort and get back to the state before "git revert",
hint: run "git revert --abort".
hint: Disable this message with "git config advice.mergeConflict false"

Then as the hints say, I type ‘git status’, fix the error, then commit and push again. But again the same message shows and I have no idea what to do. Getting mad as a beginner.

As i found no useful guides online, please help me to fix this issue without AI.

  • Solemarc@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    4 days ago

    I’m not sure what you’re trying to do here. But you can probably get out of this state with

    git revert --abort
    

    Then your should pull from source again to make sure nothing weird is happening.

    After that, if you’re trying to rollback to a particular commit the command you probably want is

    git reset --hard commit_hash
    

    Which should drop all your local stuff and reset you straight to that commit.