![]() One way in which this manifests is when you're creating a new branch, and if there has been new work on the upstream repo, you're starting your branch out-of-date, described here by #7762 You don't necessarily know they exist, and even if you do it's not clear for people who don't do it frequently how to merge in those changes to get your branch up to date. It's not at all straightforward how to pull in updates from the default branch of the upstream repo while you're working on a contributions on your forked repo. Update: A partial solution to this, scoped only to when creating new branches, shipped in 2.4! □ □ Problem 3: Staying up to date on your fork with changes on upstream In the app, I'm still shown the "Create pull request" suggested next step even though I've already created one. This is very confusing because you already have a PR.Įxample: I'm in billygriffin/desktop (a fork of desktop/desktop) on my branch new-work, and I make some commits and create a pull request targeting the development branch of desktop/desktop. This is conceptually similar to local commits to protected branches, where ideally we wouldn't allow you to do that (because you'd never be able to push those commits to that branch), and instead give you a nice path to somewhere where your work can eventually be pushed without issue.Ī potential solution is outlined in #3918 by Problem 2: "Create pull request" is still a suggestion even after I've created a pull request for the current branch on my fork ( issue here)Īfter you create a PR from a branch of your fork that's targeting the upstream repo, the "Create pull request" suggestion is still displayed. You can't push those changes to the repo you've cloned because you don't have write access, and you can't bring them over to a fork that doesn't yet exist in a low-friction way.ĭesktop could let you know you don't have write access and give you a nice pathway to fork and create a PR. If you've cloned a repo and make some changes with the intent to contribute, you're basically stuck. Update: Solution for this shipped in 2.3! □ □ Problem 1: Trying to push changes to a repo you don't have write access to ( issue here) This process today is confusing and Desktop can make it a lot simpler and help people get out of a bind more easily. These contributions are almost exclusively made via pull requests. However, we also need to ensure any work we do here doesn't explicitly break for people who are working in "long-running" forks that have entirely diverged from upstream. The primary use case for forks is to contribute to repositories where the person contributing does not have write access. In the merge section near the bottom of the page, you can:Ĭlick Update branch to perform a traditional merge.Ĭlick the update branch drop down menu, click Update with rebase, and then click Rebase branch to update by rebasing on the base branch.This is a meta issue intended to clarify the landscape around problems related to forks of repositories. In the "Pull requests" list, click the pull request you'd like to update. Under your repository name, click Pull requests. The result is a branch with a linear history, since no merge commit is created. Rebasing applies the changes from your branch onto the latest version of the base branch. ![]() A traditional merge results in a merge commit that merges the base branch into the head branch of the pull request. For more information, see " About merge conflicts."įrom the pull request page you can update your pull request's branch using a traditional merge or by rebasing. If there are changes to the base branch that cause merge conflicts in your pull request branch, you will not be able to update the branch until all conflicts are resolved. The base branch requires branches to be up to date before merging or the setting to always suggest updating branches is enabled.įor more information, see " About protected branches" and " Managing suggestions to update pull request branches.".The pull request branch is not up to date with the base branch.There are no merge conflicts between the pull request branch and the base branch.The Update branch button is displayed when all of these are true: You can update a pull request's head branch from the command line or the pull request page. Updating your pull request with the latest changes from the base branch can help catch problems prior to merging. Before merging your pull requests, other changes may get merged into the base branch causing your pull request's head branch to be out of sync.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |