Git keeps all of its files in the .git
directory. Just remove that one and init again.
If you can’t find it, it’s because it is hidden.
- In Windows 7, you need to go to your folder, click on Organize on the top left, then click on Folder and search options, then click on the View tab and click on the Show hidden files, folders and drives radio button.
- On a Mac OS:
- Open a Terminal (via Spotlight: press CMD + SPACE, type
terminal
and press Enter) and run:defaults write com.apple.finder AppleShowAllFiles 1 && killall Finder
Note: The keyboard shortcut to show hidden files in Finder is CMD + SHIFT + . so it is no longer necessary to modify the finder config this way - You could also type
cd
(the space is important), drag and drop your git repo folder from Finder to the terminal window, press return, then typerm -fr .git
, then return again.
- Open a Terminal (via Spotlight: press CMD + SPACE, type
- On Ubuntu, use shortcut Ctrl + H.
Related Posts:
- Is there a command to undo git init?
- How do I delete a Git branch locally and remotely?
- How do I rename a local Git branch?
- What does cherry-picking a commit with Git mean?
- Git refusing to merge unrelated histories on rebase
- What is the difference between git push origin and git push origin master
- Git pushing to remote branch
- git – remote add origin vs remote set-url origin
- How do I undo ‘git add’ before commit?
- Git: Message ‘src refspec master does not match any’ when pushing commits in Git
- How can I see the differences between two branches?
- How to upgrade Git on Windows to the latest version
- Need to reset git branch to origin version
- How do I push a new local branch to a remote Git repository and track it too?
- git: fatal: Could not read from remote repository
- Windows git “warning: LF will be replaced by CRLF”, is that warning tail backward?
- What does “Changes not staged for commit” mean
- How to change the URI (URL) for a remote Git repository?
- What would I use git-worktree for?
- Git error when trying to push — pre-receive hook declined
- How do I revert all local changes in Git managed project to previous state?
- How to revert multiple git commits?
- What is git fast-forwarding? [duplicate]
- The following untracked working tree files would be overwritten by merge, but I don’t care
- fatal: The current branch master has no upstream branch
- You have not concluded your merge (MERGE_HEAD exists)
- How to cherry-pick multiple commits
- Reset local repository branch to be just like remote repository HEAD
- git – pulling from specific branch
- What is “origin” in Git?
- How to copy commits from one branch to another?
- Another git process seems to be running in this repository
- How do you stash an untracked file?
- How do I call git diff on the same file between 2 different local branches?
- How to git rebase a branch with the onto command?
- Remove a git commit which has not been pushed
- How can I make Git “forget” about a file that was tracked, but is now in .gitignore?
- How to remove files from git staging area?
- How to rename a directory/folder on GitHub website?
- How do I ignore an error on ‘git pull’ about my local changes would be overwritten by merge?
- Create a git patch from the uncommitted changes in the current working directory
- How to undo git reset –soft to get my changes back?
- git push says “everything up-to-date” even though I have local changes
- .gitignore and “The following untracked working tree files would be overwritten by checkout”
- How to create a .gitignore file
- How do I rename a repository on GitHub?
- git – Your branch is ahead of ‘origin/master’ by 1 commit
- Why does git say “Pull is not possible because you have unmerged files”?
- How to see the changes between two commits without commits in-between?
- Git: Installing Git in PATH with GitHub client for Windows
- How to delete a stash created with git stash create?
- Git: How to update/checkout a single file from remote origin master?
- In a Git repository, how to properly rename a directory?
- How to “git clone” including submodules?
- ERROR: Error cloning remote repo ‘origin’
- My new Github page isn’t showing up
- How can I remove a commit on GitHub?
- What is the difference between ‘git remote update’, ‘git fetch’ and ‘git pull’?
- GitLab remote: HTTP Basic: Access denied and fatal Authentication
- How can I add a blank directory to a Git repository?
- Git Extensions: Win32 error 487: Couldn’t reserve space for cygwin’s heap, Win32 error 0
- What does git push origin HEAD mean?
- Delete branches in Bitbucket
- What to gitignore from the .idea folder?git intellij-idea gitignore webstorm
- Is it possible to pull just one file in Git?
- Git lfs – “this exceeds GitHub’s file size limit of 100.00 MB”
- How do you clone a Git repository into a specific folder?
- Aborting commit due to empty commit message
- git checkout master error: the following untracked working tree files would be overwritten by checkout
- How to update a branch with master on GitHub
- How can I see the changes in a Git commit?
- Completely cancel a rebase
- How to discard local changes and pull latest from GitHub repository
- Git removing upstream from local repository
- Git: What’s the best practice to “git clone” into an existing folder?
- Git pull – Please move or remove them before you can merge
- Unlink of file Failed. Should I try again?
- How to recover stashed uncommitted changes
- Git Pull is Not Possible, Unmerged Files
- Resetting remote to a certain commit
- Change the location of the ~ directory in a Windows install of Git Bash
- Differences between Commit, Commit and Push, Commit and Sync
- How can I delete all Git branches which have been merged?
- git replace local version with remote version
- Where is git.exe located?
- How to find which git branch I am on when my disk is mounted on other server
- Git checkout – switching back to HEAD
- How to create a new branch from a tag?
- Import existing source code to GitHub
- git checkout all the files
- Git Workflow for Large, Live Site?
- Workflow for working with git and WordPress
- Git beginner: Keeping track of on-server changes
- best practice on pushing staging development (database/uploads) to the live server
- Initial wordpress deploy via git
- How to use wordpress with Git?
- Is it possible to checkout a beta version of WordPress via github?
- how can I create a WP offline environment before releasing the websites? [closed]
- How to tell which local branch is tracking which remote branch in Git?
- How to retrieve the last modification date of all files in a Git repository