提取GIT最近提交的修改文件

代码

复制代码
# git 提交号,指定某一次提交涉改动的git号
git log 9865596e6725b2001aca3c8efbbd9c3e48428a85 -1 --name-only | grep '/' | awk '{print $1}' > list.txt
mkdir temp
xargs -a ./list.txt cp --parents -t ./temp
cd temp
tar -czvf modules.tar.gz *

替换log后的id号为指定

提取多次修改的文件时,注意路径每次提交完回到主目录

打包完成

参考文献

提取指定GIT提交记录所涉及修改文件(含文件路径)_git 提取变更文件-CSDN博客

相关推荐
淘矿人20 小时前
从0到1:用Claude启动你的第一个项目
开发语言·人工智能·git·python·github·php·pygame
lpfasd12320 小时前
Git/Gitee/GitHub 3 个安全凭证详解
git·gitee·github
李日灐1 天前
< 7 > Linux 开发工具:git 版本控制器 和 cgdb/gdb 调试器
linux·运维·服务器·开发语言·git·调试器·gdb/cgdb
Gust of wind1 天前
idea结合git和Gitee的初步使用
git·gitee·intellij-idea
夜七少eleanor1 天前
【Git】2026全图文详解安装教程
git
海边的Kurisu1 天前
从零开始的Git生活 | 刚实习同学的噩梦 And 参与开源不可缺的一环
git·生活
不老刘1 天前
Git Cherry-Pick:微前端架构下的“精准医疗”与最佳实践
前端·git
爬楼的猪1 天前
Git Folder Dashboard
git
Uncertainty!!1 天前
claude code中添加skills自动生成git commit信息
git·git commit·claude code
FserSuN1 天前
Git Worktree 使用学习
git·学习