Y
Y
Yuriy2018-03-30 03:08:10
git
Yuriy, 2018-03-30 03:08:10

GIT How to get all changed files after a certain commit?

How to get to copy somewhere all changed files from a certain commit?
Well, something like this:
git show --pretty="" --name-only 963bcc1
but it is of interest to physically copy all the changed (added) files somewhere ... (for example, to another partition of the disk)
UDP.
for unix

git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT $commit_id | xargs tar -rf git_files_update.tar

for win
for /f "usebackq tokens=*" %A in (`git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT $commit_id`) do echo FA|xcopy "%~fA" "C:\git_files_update\%A"

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sanovskiy, 2018-03-30
@Sanovskiy

git diff --name-only startid endid

for example
All changes in the last 3 commits.

Y
Yuriy, 2018-03-30
@yous

and how to redirect the result? well, i.e. copy files?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question