Whatever the circonstances, while your PR was idle, the work on the main repository continued! Other Pull Requests were merged, which means new blue commits were added on develop branch.ģ) Unfortunately, because a Pull Request always target the latest commit on targeted branch, it might not be mergeable anymore. Maybe you got feedbacks and could not handle them sooner because you were busy. Maybe it needed some advanced exploration and testing to make sure it was free of bugs. Maybe it needed some adjustments, required by the maintainers. However your PR was not merged immediately. ![]() Your PR could have been merged without issues. Your Pull Request goal is to merge the 2 red commits into the develop branch.Ģ) At the time you created your branch, everything was fine. Your branch my-branch is issued from the last blue commit, the HEAD of develop. The blue commits are the develop commits, the red commits are the commits you added on your branch. Here is a small graph presenting the situation: We'll say the main branch is called develop and your branch is my-branch. This branch was issued from the repository main branch HEAD, the latest commit available on the main branch. How did we end up here ? Here is probably what happened :ġ) In order to create the PR, you forked the main repository and created a branch of yours. This will be indicated by GitHub as such:Īnd even if your PR meets all the other criteria to be merged, the merge cannot happen. This can happen for several reasons, the most frequent one being that files modified in your PR are in conflict with changes that have already been merged. However it might happen that your PR (Pull Request) becomes out-of-date. If you are reading this, congratulations! Because it means you have submitted a Pull Request to an open source project hosted on GitHub and that is already remarkable. The main idea however should be accurately presented. Please note that, in order to make this post accessible to people still not comfortable with git concepts, I will simplify and twist a little how git rebases work, in order to make them easier to understand. ![]() you need to rebase one Pull Request you have submitted and you do not know how or why.you are willing to contribute to an open source project hosted on GitHub. ![]() So I'll continue this post while considering that It does not explain "how" (this part has been addressed already by multiple posts, you'll find links about this at the end) to perform the rebase but rather what happens behind the curtain and why it is needed. This blog post is intended to help people willing to understand what it means to rebase a Pull Request submitted on GitHub.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |