From ba64a2b962f2291039b43f536d1026f8a7d6d17e Mon Sep 17 00:00:00 2001 From: Andree Valle Campos Date: Wed, 20 Dec 2023 11:54:18 +0000 Subject: [PATCH] relocate rebase action within the using github section --- CONTRIBUTING.md | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4c2e6b6c..172ff80a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -121,18 +121,6 @@ If you need the version of a package that is not programmatically loaded, i.e., To merge your new episodes: - Make a Pull request (PR). You can follow the stesp on [using GitHub](#using-github). -- If you need to get the latest commits in the `main` branch to use them in your development, we recommend rebasing your feature branch. Rebase will keep the [commit history linear](https://epiverse-trace.github.io/blueprints/git-branching-merging.html#merging-pull-requests-merge-commits-vs-squash-and-merge-vs-rebase-and-merge). First, make sure that you are the only contributor in the `feature` branch, then: - - In the local repository, follow all these five steps: - 1. Switch to the `main` branch: `git checkout main` - 2. Pull the `main` branch: `git pull` - 3. Switch to your `feature` branch: `git checkout feature` - 4. [Rebase](https://docs.gitlab.com/ee/topics/git/git_rebase.html) your `feature` branch onto `main` branch: `git rebase main` - 5. Push your rebased `featured` branch using the `--force` option (this must be a forced update): `git push --force` - - In the remote repository, only if you are in a PR: - - Update your PR branch with [Update with Rebase](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/keeping-your-pull-request-in-sync-with-the-base-branch#updating-your-pull-request-branch). - - To pull changes to your local repository from an updated PR branch with rebase in the remote, run: `git pull --rebase` - - #### Reviewer: @@ -210,6 +198,20 @@ Each lesson has a team of maintainers who review issues and pull requests or encourage others to do so. The maintainers are community volunteers, and have final say over what gets merged into the lesson. +#### Rebase + +- If you need to get the latest commits in the `main` branch to use them in your development, we recommend rebasing your feature branch. Rebase will keep the [commit history linear](https://epiverse-trace.github.io/blueprints/git-branching-merging.html#merging-pull-requests-merge-commits-vs-squash-and-merge-vs-rebase-and-merge). First, make sure that you are the only contributor in the `feature` branch, then: + - In the local repository, follow all these five steps: + 1. Switch to the `main` branch: `git checkout main` + 2. Pull the `main` branch: `git pull` + 3. Switch to your `feature` branch: `git checkout feature` + 4. [Rebase](https://docs.gitlab.com/ee/topics/git/git_rebase.html) your `feature` branch onto `main` branch: `git rebase main` + 5. Push your rebased `featured` branch using the `--force` option (this must be a forced update): `git push --force` + - In the remote repository, only if you are in a PR: + - Update your PR branch with [Update with Rebase](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/keeping-your-pull-request-in-sync-with-the-base-branch#updating-your-pull-request-branch). + - To pull changes to your local repository from an updated PR branch with rebase in the remote, run: `git pull --rebase` + + ### Other Resources The Epiverse-TRACE is a global organisation with volunteers and learners all over