Macを新調した際にgitの短縮コマンド設定のやり方を忘れていたため、調べた。
» git config -e
[alias] st = status co = checkout
viコマンドで編集できる。保存
» git st On branch main Your branch is up to date with 'origin/main'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git restore <file>..." to discard changes in working directory) modified: s61/index.php modified: s61/person.php no changes added to commit (use "git add" and/or "git commit -a")
» git co -b test Switched to a new branch 'test' » git co - M s61/index.php M s61/person.php Switched to branch 'main' Your branch is up to date with 'origin/main'.
こんな感じで使う 便利。
藤井 穣: yutaka@worldcraft.co.jp