Open3
Git エイリアス覚書
~/.gitconfig
の [alias]
セクションに記述するとエイリアスを登録できる。!
から始めることで git
以外のコマンドも登録できる。
[alias]
s = status
これで status
を s
と打つだけで実行できるようになる。
$ git s
Empty Commit
空コミット。主に Pull-Request 作成用。fc = first commit
で。
Alias
[alias]
fc = commit --allow-empty -m \"Make Pull-Request\"
Sample
$ git fc
Commit to all file
ステージ上にある新しい変更ファイルすべてをまとめてコミット。細かくコミットするのが面倒、あるいはコミットごとの作業を分けられる人向け。ac = all commit
で。
Alias
[alias]
ac = !"f() { git add -A; git commit -m \"$1\"; }; f"
Sample
$ git ac "Commit Message"