Reputation: 121
I need to create a list with files which was added, changed and deleted between two git revisions. List with added/changed files I can get by this command:
git diff --name-only $from_revision $to_revision > "changes.txt"
it gives a simple and clean list in changes.txt like this:
addons/tiny_mce/plugins/image/plugin.min.org.js
addons/webrtc/adapter-latest.js
templates/standard/style/review.css
My question is how can I generate a similar list with files deleted between two commits?
OS: Ubuntu 16.04, git: version 1.9
Upvotes: 2
Views: 72
Reputation: 45352
You can use --diff-filter
and filter only deleted files with D
:
git diff --name-only --diff-filter=D $from_revision $to_revision
Upvotes: 3