Techstacker
Light ModeDark ModeReset dark mode. Falls back to OS dark mode setting.

Pages

No results for 'undefined'

Blog Posts

No results for 'undefined'
Powered by Algolia

How to Delete a Git Init From Your Repository

Oct 18, 20191 min readGitViews:

If you want to remove a Git Init file, e.g. from a cloned GitHub respository, first make sure that you are in the correct directory, you can run the following command inside your terminal:

rm -rf .git

Now when you run git status, your terminal will tell you:

fatal: Not a git repository (or any of the parent directories): .git

Now you can add your own init file to the repository using git init, and start working with a clean git history file.