UGA Boxxx

つぶやきの延長のつもりで、知ったこと思ったこと書いてます

【Git】git switchとgit restore

まだgit checkoutを使っていたので知識を更新する

zenn.dev

使いそうなやつだけメモ

  • git switch
    • git switch <branch>:ブランチ切り替え
    • git switch -c <branch>:ブランチ作成
    • git switch -:一個前のブランチに戻る
  • git restore
    • git restore <file>:ファイルを元に戻す
    • git restore --staged <file>:Staging状態のファイルを元に戻す