Open3

Git エイリアス覚書

Stag BusterStag Buster

~/.gitconfig[alias] セクションに記述するとエイリアスを登録できる。! から始めることで git 以外のコマンドも登録できる。

[alias]
    s = status

これで statuss と打つだけで実行できるようになる。

$ git s
Stag BusterStag Buster

Empty Commit

空コミット。主に Pull-Request 作成用。fc = first commit で。

Alias

[alias]
    fc = commit --allow-empty -m \"Make Pull-Request\"

Sample

$ git fc
Stag BusterStag Buster

Commit to all file

ステージ上にある新しい変更ファイルすべてをまとめてコミット。細かくコミットするのが面倒、あるいはコミットごとの作業を分けられる人向け。ac = all commit で。

Alias

[alias]
    ac = !"f() { git add -A; git commit -m \"$1\"; }; f"

Sample

$ git ac "Commit Message"