How to get files zakomirny in a separate commit?

0 like 0 dislike
44 views
Is the folder structure for the files.
In one of the commits change something.
Next, I want to upload only changed files added in this commit, and retaining the parent folder.
Need to send changes to a third party.

Sample project:
classes
- general
- - class1.php
- - class2.php
- helpers
- - helper1.php
- - helper2.php
lib
- pdf
- - folder1
- - - file.php
- - - file2.php
- - folder2
- - - script1.php
- - - script2.php
- - file.txt
- - file.php
- xls

In a separate commit modified files
classes/helpers/helper1.php
lib/pdf/folder1/file.php
lib/xls/addedfile.php

The output should be an empty folder structure with the changed and added files.
targetfolder
- classes
- - helpers
- - - helper1.php
- lib
- - pdf
- - - folder1
- - - - file.php
- - xls
- - - addedfile.php

Is there a solution "out of the box" teams in the Gita.
Or you did that by command-line tools.
Choose grep-om the paths of the files no problem.
But for implementation, you need an additional script that rasarit way, will recreate the structure, copy files into the appropriate folders.
by | 44 views

2 Answers

0 like 0 dislike
Once upon a time retained, but not tested:
git diff-tree-r --no-commit-id --name-only --diff-filter=ACMRT commit_hash | xargs tar-rf mytarfile.tar
by
0 like 0 dislike
by

Related questions

0 like 0 dislike
2 answers
asked Apr 14, 2019 by Sergalas
0 like 0 dislike
7 answers
0 like 0 dislike
2 answers
0 like 0 dislike
2 answers
asked Jun 9, 2019 by xakslim
0 like 0 dislike
2 answers
asked Apr 11, 2019 by Paramount1987
110,608 questions
257,186 answers
0 comments
33,707 users