6
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Git | 一括で commit する

Last updated at Posted at 2016-03-08

コマンドは次のとおり。

$ git add .
$ git commit

git ではコミットを作る前に、いちど「ステージング」という作業が必要だ。
なので「いったんすべてを add してから」「普通に commit する」というのが解だ。

前記のコマンドでは 「カレントディレクトリ以下の全変更」 を対象に、新しいコミットを作ることが出来る。

コマンド一発

エイリアスを登録すれば。コマンド一個ですべて commit できる。

.gitconfig
[alias]
  commit-force = !git add . && git commit
  cmf = !git commit-force

以下をコマンドするだけ。

git commit-fource

短縮名だともっと早い。

git cmf

環境

  • git version 2.3.8 (Apple Git-58)

チャットメンバー募集

何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。

メンター受付

6
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?