How to fully delete a git repository created with init?

前端 未结 13 1928
再見小時候
再見小時候 2020-11-22 16:42

I created a git repository with git init. I\'d like to delete it entirely and init a new one.

13条回答
  •  深忆病人
    2020-11-22 17:21

    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
    

提交回复
热议问题