Quantcast
Channel: Bashタグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 2869

最速でgit add -uとコメント付きcommitする

$
0
0

ファイルをステージングにaddしてコミットするのが面倒だ。

とくに

git commit -m"message"

のダブルクオーテーションを入力するときにタイピング速度が落ちるのが嫌だった。

なので、shellで対話モードで開いてくれて入力待ちしてくれるスクリプトを作った。

gcimコマンドの中身

#! /bin/bashecho"add update file to staging"echo Write commit Messge ...
read msg
git add -u
git ci -m"$msg"

使い方はこんな感じ

gcim
# >>> 入力モード# これでgit add -u && git ci -m "<入力結果>"をしてくれる

とりあえず超シンプルなコードだけ書いた。Macでのみうごくので、使う人は適当に改良してほしい。

GitHub: gcim


Viewing all articles
Browse latest Browse all 2869

Trending Articles