git-diff-tree

Get a list of changed files and their status for a specific Git commit

筅森魡賤 提交于 2019-12-23 10:25:36
问题 I use the following Git command git diff-tree --no-commit-id --name-only -r <SHA> to get a list of changed files. Unfortunately, the list doesn't specify the type of change for each file: added, modified or deleted ... etc How may I display a list of changes [type of change, file name] in a given SHA of a specific commit. 回答1: Use --name-status instead of --name-only git diff-tree --no-commit-id --name-status -r <SHA> This will show the filename with a status letter of (extracted from man):

Need to get all file differences (added, modified, renamed) between two Git commits

喜夏-厌秋 提交于 2019-12-10 11:35:38
问题 I'm trying to export all files with differences between two commits, those differences being: New files (Added) Modified files Renamed files If possible, information on any deleted files Detecting renames may be a tough one as I will be doing the exporting on a Windows 7 environment and hence somefile.php is the same as SomeFile.php ; but I will be uploading them to a *nix environment, which does treat those files as being different, so they are needed to be recognized and exported if

Need to get all file differences (added, modified, renamed) between two Git commits

喜你入骨 提交于 2019-12-08 03:03:23
I'm trying to export all files with differences between two commits, those differences being: New files (Added) Modified files Renamed files If possible, information on any deleted files Detecting renames may be a tough one as I will be doing the exporting on a Windows 7 environment and hence somefile.php is the same as SomeFile.php ; but I will be uploading them to a *nix environment, which does treat those files as being different, so they are needed to be recognized and exported if possible. I was using the below command: git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT $head