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. Good way of explaining, and nice paragraph to obtain information regarding my presentation subject matter, which i am going to convey in university.

    Reply
  2. Panel interview where generally 3 managers take turns asking situational inquiries.

    Reply
  3. I am genuinely glad to glance at this webpage posts which consists of tons of useful information, thanks for providing such statistics.

    Reply
  4. Hi there! I just wanted to ask if you ever have any issues with hackers? My last blog (wordpress) was hacked and I ended up losing several weeks of hard work due to no backup. Do you have any methods to protect against hackers?

    Reply
  5. Do you have a spam problem on this website; I also am a blogger, and I was wanting to know your situation; many of us have created some nice practices and we are looking to excchange techniques with other folks, please shoot me an e-mail if interested.

    Reply
  6. Great article. I'm experiencing a few of these issues as well..

    Reply