如何获取用户所有修改文件的列表并将文件移动到新分支?

How to get a list of all modified files by a user and move the files to a new branch?

我想知道如何获取特定用户自开始提交并推送到存储库以来编辑过的所有文件的列表。

我需要这样做,因为这个用户应该为它的修改创建一个新分支,但它没有这样做,所以我需要找到解决这个问题的方法。

:)

git log --name-only --oneline --author user > changed_files_tmp.txt

每次提交都会有记录:

7ac4432 Bug 100 Try to fix
file1
file2
dir/file3

您需要删除带有提交消息的行(我希望您在提交消息中有一些模式)并且您有文件列表,由该用户更改。在这种情况下,我假设所有提交在提交消息中都有 Bug 并且没有 Bug 文件:

cat changed_files_tmp.txt | grep -v Bug | sort | uniq > changed_files.txt