git - 从修改后的拉取请求中取回提交
问题描述
我有人向我发送了关于我的团队正在工作的项目的拉取请求。但是,在将其合并到工作分支之前,我需要进行很多更改。我不知道该怎么做,所以我搜索它并遇到了这个。它展示了如何获取拉取请求并进行更改、评估它然后合并到 master。我这样做并被放在了分支中e95c037
。
我做了很多更改并且很满意并准备合并它。当我签出 master 时,我收到一个警告,说你要留下一堆提交。然后当我按照最后两个步骤
git add --all
git commit -m "Modified PR"
没啥事儿。我无权访问我的新更改。我试过检查e95c073
是这样说的:
Note: checking out 'e95c037'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b new_branch_name
HEAD is now at e95c037... Change name
但我的文件不存在。新的目录结构(我在修改拉取请求时创建的)但这些目录中没有文件。
我失去了一切吗?如果我可以取回所有内容,我该如何合并这个修改后的拉取请求?
解决方案
推荐阅读
- xcode10 - 如何在 Xcode 10 中以编程方式更改按钮的背景颜色?
- python - Django:访问传递给 DetailView 的单个模型对象以操作其属性值
- machine-learning - 与 Python 相比,Octave 在机器学习方面的局限性是什么?
- flutter - Flutter tabcontroller index不响应tabbarview的变化
- javascript - Google Maps API - 自定义圆圈 onclick 事件未触发
- arrays - 如何确保json保持数组
- java - 导入冲突,导入名称“Toast”不明确
- git - 大型团队如何在软件行业中使用分支?
- ios - 如何使 UITextView 填满剩余空间
- android - 应用程序未显示存储在本地的阿拉伯语言