LoginSignup
7
4

More than 3 years have passed since last update.

git add -uで変更箇所だけaddする

Last updated at Posted at 2019-04-15

変更ファイルのみgit addしたいときはこのコマンド

$ git add -u

実行例

まだbranch上に何もない
スクリーンショット 2019-04-15 14.25.50.png

コード追加する
スクリーンショット 2019-04-15 14.26.19.png

ここで

$ git add -u

変更ファイルのみaddされる
スクリーンショット 2019-04-15 14.26.58.png

最後にmasterにpush

$ git commit -m 'fix'
$ git push origin master
7
4
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
7
4