git
› Pro Git
› Atlassian Git Tutorial
› Pro Git 简体中文翻译
› GitX
sarices
V2EX  ›  git

git 生成更新包问题

  •  
  •   sarices · Feb 5, 2015 · 3580 views
    This topic created in 4293 days ago, the information mentioned may be changed or developed.
    现在用git diff 对比当前HEAD和上次更新打的 tag生成文件列表方式打包
    用来很久没发现问题,最近才注意到delete的问题就也会包含进去的,有没有方法能打包一份只是新增文件和修改文件的呢,并且生成要删除文件的列表
    5 replies  •  2015-02-07 08:54:38 +08:00
    xuewl
    xuewl
    Feb 6, 2015
    1
    git diff before after --name-only | xargs zip upgrade.zip
    sarices
    sarices
    OP
    Feb 6, 2015
    2
    @xuewl ... 你没明白我的问题
    xuewl
    xuewl
    Feb 6, 2015
    3
    @sarices sorry,确实会回过头来才发现。坐等大神。
    imbahom
    imbahom
    Feb 6, 2015
    4
    用--name-status呗
    cute
    cute
    Feb 7, 2015
    5
    git status -s|awk '{if($1=="M" || $1=="A")print $2}' | xargs zip upgrade.zip
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   737 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 19:20 · PVG 03:20 · LAX 11:20 · JFK 14:20
    ♥ Do have faith in what you're doing.