How can I re-init my git repo?

后端 未结 1 2040
时光说笑
时光说笑 2021-02-13 13:24

I\'ve been doing some beginning work on a repo and I don\'t need the history.

I want to start from ground zero w/ no history?

Can I simply delete the .git<

相关标签:
1条回答
  • 2021-02-13 13:52
    cd "$PWD/`git rev-parse --show-cdup`" #go to the project's root
    rm -rf .git
    

    And then:

    git init .
    #...
    

    As for your remote repos, you'll need to git push --force into them (or push to a new, completely separate branch).

    0 讨论(0)
提交回复
热议问题