Skip to content

Instantly share code, notes, and snippets.

View vishalbhimani's full-sized avatar

Vishal Bhimani vishalbhimani

View GitHub Profile
@vishalbhimani
vishalbhimani / git-deleteHistory
Created May 30, 2020 08:59
Delete all commit history in github repository
#Checkout
git checkout --orphan <LATEST BRANCH>
#Add all the files
git add -A
#Commit the changes
git commit -am <COMMIT MESSAGE>
#Delete the branch
@vishalbhimani
vishalbhimani / git-clearHistory
Last active May 30, 2020 08:48
Clear out the history of a git repository
// Remove the history from repository
rm -rf .git
// initialise your new Git repo
git init
// places files in a special staging area
git add .
// make a commit with message
git commit -m "Initial commit"