Add guide / documentation on how to rebase for this project

Created on 23 September 2022, about 2 years ago
Updated 20 May 2024, 6 months ago

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?
📌 Task
Status

Fixed

Version

1.0

Component

Documentation

Created by

🇪🇸Spain fjgarlin

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

  • Needs documentation

    A documentation change is requested elsewhere. For Drupal core (and possibly other projects), once the change has been committed, this status should be recorded in a change record node.

  • Documentation

    Primarily changes documentation, not code. For Drupal core issues, select the Documentation component instead of using this tag. In general, component selection is preferred over tag selection.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024