Problem/Motivation
If a merge request needs rebase:
First check if a blue "rebase" button is available in the GitLab UI. If so, use that. That means it can rebase clean with no conflicts.
If there are going to be conflicts, you need to rebase it locally.
To get that set up:
1. go to the issue fork repo by clicking the issue fork from the issue.
2. open the "Clone" blue dropbutton, and copy the git link (Clone with SSH)
3. clone it somewhere - `git clone <paste>`
4. go into that folder `cd <folder it cloned to>`
5. add the original project as an upstream remote: `git remote add upstream git@git.drupal.org:project/project_browser.git`
6. ensure you're on the 1.0.x branch of the local issue fork (`git checkout 1.0.x` if you're not)
7. then pull remotes changes into your local 1.0.x `git pull --rebase upstream 1.0.x` - you should see this pull in the latest from the upstream project
8. check out the issue branch now - `git checkout <your branch>` - the branch should start with the issue number
9. Now that you're on the issue branch, rebase it on top of the latest 1.0.x: `git rebase 1.0.x`
10. you will have conflicts. to resolve:
(a) anything in sveltejs/public/build can be resolve by just rebuilding over the top of the files that are there: `yarn install && yarn build` from the sveltejs folder.
(b) other things will need to be intelligently rebased - contact the person whose work you may be dealing with from 1.0.x if needed, or tim.plunkett or chrisfromredfin in #project-browser
11. files that are marked "both modified" in a git status need to be dealt with. if you have generated a new change or file, it will be in "changes not staged for commit" - generally you will want to check those out and ignore those changes. `git checkout -f <yarn.lock, ex.g.>`
12. ones that are marked "unmerged" need to be added, then continue with your rebase: `git add <file>` and then `git rebase --continue`
13. now that you're rebased, you will have divergent branches; to resolve, you force push to the issue fork branch: `git push --force origin`
14. on the merge request (when you push it gives you the link right to it), you should now see a blue 'merge' button
Steps to reproduce
Proposed resolution
Create a guide for this project based on the above info.
Remaining tasks
- ✅ File an issue about this project
- ☐ Manual Testing
- ☐ Code Review
- ☐ Accessibility Review
- ☐ Automated tests needed/written?
Comments
Comment #2
chrisfromredfinThis is great; we need to add this into the CONTRIBUTOR.md if possible.
Comment #4
fjgarlin commentedAdded the above into the contributor.md file. Please review and iterate over the MR as needed.
Comment #6
chrisfromredfinBig help! Sorry it sat so long. :)