git 摘取两个版本差异文件 获取增量更新包

受疫情影响在家总结前段时间的一些心得
每当改动调整了一些小bug或者小需求需要上传代码的时候,往往是不需要全量代码覆盖更新的,只需要摘出改动的文件即可。

版本控制工具导出增量更新包

查看版本记录log,选定指定某几个版本后点击导出即可

git diff eec76087115e3684c79410f7e3dab2a450e56d0b 9b75d2919c662bc846880c331003f4bf4b894ced --name-only | xargs -i cp '{}' ./update/ --parents

解释:通过xargs 命令,把git diff eec76087115e3684c79410f7e3dab2a450e56d0b 9b75d2919c662bc846880c331003f4bf4b894ced --name-only找到的所有文件名,作为参数传到给cp的第一个参数('{}'),并保留目录结构(--parents)拷贝到当前目录(./)的update文件夹中

增量更新代码

通过上述方法得到增量更新包后,上传到服务器,选择覆盖替换改动到的文件即可完成增量更新。避免了一些小改动把所有的代码文件重新上传一遍,大大提到了工作效率。

Responses
  1. I could not refrain from commenting. Exceptionally well written!

    Reply
  2. Does your site have a contact page? I'm having trouble locating it but, I'd like to send you an e-mail. I've got some ideas for your blog you might be interested in hearing. Either way, great website and I look forward to seeing it grow over time.

    Reply
  3. Thank you for some other informative website. The place else may just I get that kind of information written in such an ideal approach? I have a undertaking that I am just now running on, and I've been at the look out for such info.

    Reply
  4. What's up Dear, are you genuinely visiting this web page on a regular basis, if so afterward you will without doubt get good know-how.

    Reply
  5. Hi there, I discovered your site by way of Google even as searching for a related matter, your web site came up, it looks great. I've bookmarked it in my google bookmarks. Hi there, simply was aware of your weblog via Google, and found that it's truly informative. I'm gonna be careful for brussels. I'll be grateful if you happen to continue this in future. Lots of other people will likely be benefited from your writing. Cheers!

    Reply
  6. What a stuff of un-ambiguity and preserveness of precious familiarity about unexpected emotions.

    Reply