当GitHub分叉得到更新时,我仍然有我的分叉当前仍然有待处理的请求? [英] When a GitHub fork gets updated how do I keep my fork current while I still have a pending pull request?

查看:84
本文介绍了当GitHub分叉得到更新时,我仍然有我的分叉当前仍然有待处理的请求?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理一个项目的分支,并发送一个请求。但是,当我仍然有待处理的推送时,我从中分出的回购更新。如何保持最新状态而不会丢失对pull请求的更改?

I'm working on a fork of a project and I send a pull request. But the repo I forked from gets updated when I still have a pending push. How do I keep upto date without losing my changes from the pull request?

推荐答案

您的pull请求中的提交应该位于不同的分支。

The commits from your pull request should be in a different branch.

所以你可以简单地 git pull upstream git merge --ff -only upstream / master (确保您首先在您的主分支中: git checkout master )使您的主分支保持最新状态(假设原始的回购是在一个叫做上游的远程)

So you can simply git pull upstream and git merge --ff-only upstream/master (ensure that you are in your master branch first: git checkout master) to bring your master branch up to date (assuming the original repo is in a remote called upstream)

这篇关于当GitHub分叉得到更新时,我仍然有我的分叉当前仍然有待处理的请求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆