Skip to content

Instantly share code, notes, and snippets.

View halmogbl's full-sized avatar
🎯
Focusing

Hamad halmogbl

🎯
Focusing
View GitHub Profile
@halmogbl
halmogbl / repo-reset.md
Created July 17, 2020 03:56 — forked from heiswayi/repo-reset.md
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
{
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"link": {
"type": "string"