1 0o0O0o0O0o 2022-10-14 14:48:19 +08:00 via iPhone git diff --name-only |
![]() | 2 lambdaq 2022-10-14 14:53:04 +08:00 diff 协议就是差量化拉代码的工具哎。。。。不要记录可以 git pull --depth=1 |
![]() | 3 ShineyWang 2022-10-14 14:57:35 +08:00 我之前弄过,把本地的 git 修改代码作为更新文件 #!/bin/bash # Target directory # https://stackoverflow.com/questions/31340933/copy-all-files-changed-in-last-commit head0=${1:-head~0} head1=${2:-head~1} TARGET=${3:-publishTemp} echo "Finding and copying files and folders to $TARGET" for i in $(git diff --name-only $head0 $head1) do # First create the target directory, if it doesn't exist. mkdir -p "$TARGET/$(dirname $i)" # Then copy over the file. cp "$i" "$TARGET/$i" done echo "Files copied to target directory"; |
![]() | 4 ETiV 2022-10-14 15:05:19 +08:00 可以试试 cherry-pick 单独的 commit 过来 也可以直接出 2 个 commits 的 patch ,直接打到服务器的文件上… > 不想把 git 记录弄到服务器上去 不过你出版本不应该有更规范的方式吗?直接在生产环境修改文件,没了用 git 的优势… |
5 Jamy 2022-10-14 17:55:21 +08:00 window 系统下可以使用 TortoiseGit, 具体操作:项目根目录右键 - 日志 - 根据日志按需选择(ctrl 可多选) -- 选中有变化的文件--右键导出. |
6 sawyera 2022-10-14 19:16:41 +08:00 via Android 关键词:cherry-pick |
![]() | 7 815979670 2022-10-14 22:28:17 +08:00 git diff {start_commit} {end_commit} --stat 这个命令会返回两个 commit 之间变更过文件列表,之前做过升级包方案的时候用过这个东西 |
8 sjzar 2022-10-15 11:07:59 +08:00 git format-patch & git apply 做个 patch 带走 |