I created a git repository with git init
. I'd like to delete it entirely and init a new one.
相关问题
- Why does recursive submodule update from github fa
- Extended message for commit via Visual Studio Code
- Emacs shell: save commit message
- Can I organize Git submodules in a flat hierarchy?
- Upload file > 25 MB on Github
相关文章
- 请教Git如何克隆本地库?
- GitHub:Enterprise post-receive hook
- Git Clone Fails: Server Certificate Verification F
- SSIS solution on GIT?
- Is there a version control system abstraction for
- ssh: Could not resolve hostname git: Name or servi
- Cannot commit changes with gitextensions
- git: retry if http request failed
Where $GIT_DIR is the path to the folder to be searched (the git repo path), execute the following in terminal.
This will recursively search for any directories or files containing ".git" in the file/directory name within the specified Git directory. This will include .git/ and .gitignore files and any other .git-like assets. The command is interactive and will ask before removing. To proceed with the deletion, simply enter y, then Enter.
Execute
in your repo folder
I tried:
rm -rf .git
and alsoNeither worked for me. Here's what did:
.git
Then create / restore the project from backup:
after cloning the repo
cd /repo folder/
to go to the file directory then
ls -a
to see all files hidden and unhidden
.git .. .gitignore .etc
if you like you can check the repo origin
git remote -v
now delete .git which contains everything about git
rm -rf .git
after deleting, you would discover that there is no git linked check remote again
git remote -v
now you can initial your with
git init git add README.md git commit -m "first commit" git remote add origin https://github.com/Leonuch/flex.git git push -u origin master
Go to Specified Folder Where git init command executed.
Execute the below mentioned Command
rm -rf .git
Step No:1
Step No:2
Alternative to killing TortoiseGit:
rmdir /S /Q
)