linux - 如何从文件中获取要添加到 git repo 的文件?
问题描述
我想总是将相同的文件添加到我的 git 存储库中,并且我认为将一个文件文件添加到 git 将是一种简单的方法。
如何要求git add
从文件中读取要添加的文件?
解决方案
使用标准 cli 工具也很容易做到这一点:
# bash:
git add $(cat file)
# xargs is standard on linux, and comes with git-bash on Windows :
cat file | xargs git add
推荐阅读
- c# - 使用 c# 将部分块的大文件上传到 MySql 数据库
- performance - 如何识别 URL 的 curl 命令已关闭或性能问题
- javascript - 如何找到具有特定 CSS 样式属性的元素?
- asp.net-core - 使用 AddDbContextPool 时使用多个 DbContext 实例
- java - 我的数组到列表的转换不起作用,我不明白为什么?
- eclipse - 需要一些帮助导入和重建 Github java 项目
- azure - 使用 .NET Core 的 Azure AD 多租户配置
- css - 如何根据字符长度> 128的条件应用css类
- python-3.x - Python将具有多种语言的列翻译成英文
- html - 无论内容大小如何,设置固定 div