LoginSignup
1
0

間違えてgit initをしてしまった時の対処法(取り消し)

Last updated at Posted at 2024-05-15

本日のお悩み

git init

間違えて git init コマンドで関係ないgitリポジトリを作成してしまった。
このコマンドを取り消し、やり直したい。

本日の処方箋

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

このコマンド操作を取り消しやり直したい場合、間違えて作成してしまったローカルリポジトリを、上記コマンドを入力し削除すればOK!
上記コマンドを入力したらもう消えているので、あとは該当のディレクトリでもう一度git init をする

1
0
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
1
0