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

git 生成更新包问题

  •  
  •   sarices · Feb 5, 2015 · 3314 views
    This topic created in 4150 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
        1
    xuewl  
       Feb 6, 2015
    git diff before after --name-only | xargs zip upgrade.zip
    sarices
        2
    sarices  
    OP
       Feb 6, 2015
    @xuewl ... 你没明白我的问题
    xuewl
        3
    xuewl  
       Feb 6, 2015
    @sarices sorry,确实会回过头来才发现。坐等大神。
    imbahom
        4
    imbahom  
       Feb 6, 2015
    用--name-status呗
    cute
        5
    cute  
       Feb 7, 2015
    git status -s|awk '{if($1=="M" || $1=="A")print $2}' | xargs zip upgrade.zip
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5361 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 43ms · UTC 07:39 · PVG 15:39 · LAX 00:39 · JFK 03:39
    ♥ Do have faith in what you're doing.