11
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

git initの取り消し方

Posted at

git initで新規リポジトリを初期化するディレクトリを間違えてしまって、git initを取り消せないかと思って調べてみました。

解決するには当たり前ですがバージョン管理をしている.gitディレクトリを削除すればOKです。

# git initをしたディレクトリで行う
$ rm -rf .git

上記のコマンドで見事git initが無かったことになりました!
簡単でしたね!

11
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?