Skip to content

Commit

Permalink
Update clear git commit history til with added link
Browse files Browse the repository at this point in the history
  • Loading branch information
Shourai committed Jan 29, 2024
1 parent d234240 commit a3fe947
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions git/clear-git-history.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Create a temporary branch and checkout:
$ git checkout --orphan temp_branch
```

|Option | Description |
|-------|-------------|
|--orphan | Create a branch in a git init-like state |
| Option | Description |
| -------- | ---------------------------------------- |
| --orphan | Create a branch in a git init-like state |

Add all files to the temporary branch and commit the changes:

Expand All @@ -35,4 +35,8 @@ Forcefully update the remote repository:
$ git push -f origin master
```

see also https://www.shellhacks.com/git-remove-all-commits-clear-git-history-local-remote/
see also

https://www.shellhacks.com/git-remove-all-commits-clear-git-history-local-remote/

https://clearinsights.io/blog/how-to-remove-all-git-commit-history/

0 comments on commit a3fe947

Please sign in to comment.