LoginSignup
0
0

More than 3 years have passed since last update.

今まで変更があったファイルのみ git add する

Posted at

関係ないファイルまで全部整形かけちゃって、
全部 git add するとプルリクが訳わかんなくなっちゃう・・というときに

今まで変更があったファイルのみ git add する

git add $(git diff --name-only [コミットID1] [コミットID2])

例えば
fc1a73b から 14719ae までに変わったファイル を git add するには、下記のようになる

git add $(git diff --name-only fc1a73b 14719ae)

参考
https://qiita.com/koara-local/items/01b51f97cf2c4a3bfedf

0
0
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
0
0