This note covers all the common pitfalls I’ve encountered—those annoying issues I kept having to search for over and over. Here’s a collection of all the solutions I found, dumped in one place for easy reference. --- # Delete all commit history in GitHub ```bash! # main branch git checkout --orphan latest_branch git add . git commit -m "commit message" git branch -D main git branch -m main git push -f origin main # master branch git checkout --orphan latest_branch git add . git commit -m "commit message" git branch -D master git branch -m master git push -f origin master ``` # Calculate hash in cmd ```powershell! certUtil -hashfile C:\Windows\System32\ntdll.dll SHA256 certUtil -hashfile C:\Windows\System32\ntdll.dll SHA1 certUtil -hashfile C:\Windows\System32\ntdll.dll MD5 ``` # Git clone .git redundant push ```bash! git clone <repo> cd <repo> rm -rf .git cd .. git rm --cached <repo> OR git rm --cached * git add . && git commit -m "$(date)" && git branch -M main && git push -u origin main ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up