-1

the upper 2 commits are the problem

i tried doing what was answered on this similar question i tried using chatGPT and doing commands like

git fetch --all
git reset --hard origin/main

and

git reflog expire --expire=now --all
git gc --aggressive --prune=now

but nothing works

is there and actual solution or do i have to reclone the repo?

1
  • 2
    You mean to place local main on top of origin/main? The hard reset should work.... You were probably standing on a different place from local main. Try a checkout before running the hard reset Commented Dec 22, 2024 at 9:29

1 Answer 1

0

Ok I got some help and the problem was that i was trying to delete the commits when i was detached. I used the Checkout(Detached) button on the right click menu of the commit. after i moved to the branch properly i did git reset --hard back to the settings button commit, pushed and then it was fixed

Sign up to request clarification or add additional context in comments.

2 Comments

In SO etiquette, this is not the way to proceed. If "the help" was the comment I provided there, you should acknowledge, then ask me to write an answer. Not a big deal in this case, it's ok, but so that you are aware.
@eftshift0 I disagree. I don't see a problem with this. you can still write your own answer post if you think you can write a better one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.