動機

Macを新調した際にgitの短縮コマンド設定のやり方を忘れていたため、調べた。

設定

» git config -e
[alias]
        st = status
        co = checkout

viコマンドで編集できる。保存

use

» 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


トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS