Git の覚書

ローカルの変更を取り消す
git checkout .

管理されていないファイル/フォルダを削除
git clean -fd

上記2つは、続けて一緒に使ったりする。

リモートブランチを一覧表示
git branch -a

リモートブランチに切り替える
git checkout remote/origin/4.27

git branch -a で一覧取得して、checkout に指定する。

新規ブランチを作成して移動
git branch -b feature/add_func

main ブランチに戻る
git branch main