How to delete all commit history in Github | using Windows PowerShell or Github desktop to clean

Published: 30 December 2022
on channel: Coffee Programmer
3,860
32

Can you help me to buy a coffee:
https://www.buymeacoffee.com/coffeepr... Checkout

git checkout --orphan latest_branch

Add all the files

git add -A

Commit the changes

git commit -am "commit message"

Delete the branch

git branch -D main

Rename the current branch to main

git branch -m main

Finally, force update your repository

git push -f origin main


Watch video How to delete all commit history in Github | using Windows PowerShell or Github desktop to clean online, duration hours minute second in high quality that is uploaded to the channel Coffee Programmer 30 December 2022. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 3,860 times and liked it 32 visitors.