git - 如何从非跟踪代码更新 git master
问题描述
如何从非跟踪代码更新 git master
鉴于一些代码以 tar.gz 的形式出现。这是master的更新代码。
但这项工作是在 git 之外完成的。
假设我想以我的主人身份更新这个新代码。
怎么可能做到这一点
解决方案
查找 tar.gz 中的内容是从项目的哪个版本开始自行开发的。
git checkout starting-revision-id
git rm * # remove everything
tar zxvf the-file.tar.gz
git add .
git rm --cached the-file.tar.gz # just in case
git commit -m "Stuff done on the tar.gz" --author="Not me"
# if you want to set master over here:
git branch -f master
# if you want to push to a remote master branch:
git push some-remote HEAD:master
推荐阅读
- javascript - Wavify javascript 代码在 wordpress 中不起作用(未捕获的 TypeError:无法读取属性 'getBoundingClientRect' of null)
- c# - 将列表框中的数据编辑到我的 SQL 数据库
- excel - 在多个显示器中打开 Excel 文件
- owl - rdflib "EnumeratedClass" 创建枚举数据类型
- bash - 检查 bash 脚本的输出
- apache-kafka-streams - nullpointer exception in aggregate operation in kafka stream
- windows - 有人一起使用过统一写入过滤器 (uwfmgr) 和 netsh 吗?运行 netsh 然后重新启动后,我看到了一些问题
- java - Can I ignore a getter-based write-only property during deserialization in Java Jackson?
- javascript - Reducing a 2D array taking into account another 2D array
- java - how to override default hazlecast.xml configuration?