0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【Git】git diffで変更したファイルのみ取得する方法

Posted at

以下のように実行すると変更したされたファイルのみのリストを取得できます。

git diff --name-only --diff-filter=M

逆に変更されたファイルを除外したい場合にはMを小文字にします。

git diff --name-only --diff-filter=m

他のフィルタは以下のとおりです。

文字 意味
A 追加
C コピー
D 削除
M 変更
R 名称変更
T タイプ(通常ファイル、シンボリックリンク、サブモジュールなど)変更
U マージ解除
X 不明
B ペアリング解除
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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?