Thursday, November 24, 2022

How to delete all commit history in GitHub & repush to main?

Create a new Branch:

git checkout --orphan latest_branch

Add your all the files:

git add .

Save the changes with commit:

git commit -m "commit message"

Delete Main Branch:

git branch -D main

Rename latest_branch to main:

git branch -m main

Force update the repo:

git push -f origin main

No comments:

Post a Comment

Office 2021 Activation using command

  @echo off title Activate Microsoft Office 2021 (ALL versions) for FREE - office.com&cls&echo =====================================...