How to fix overriding the main branch in Git?

35 views Asked by At

I override the main branch by:

git rebase feature/create_ffmpeg_dockerfil

git push origin feature/create_ffmpeg_dockerfile

git push -f -u origin feature/create_ffmpeg_dockerfile

git checkout feature/create_ffmpeg_dockerfile
git branch main feature/create_ffmpeg_dockerfile -f
git checkout main git push origin main -f

my commite appear in the main branch how can I restore the main?

I try this: git rebase --abort fatal: No rebase in progress

and also this: git revert <commit id> error: Reverting is not possible because you have unmerged files. hint: Fix them up in the work tree, and then use 'git add/rm ' hint: as appropriate to mark resolution and make a commit. fatal: revert failed

0

There are 0 answers