From a3fedd5ff43eaf48d1e863c47ab1d8ad7e261cbb Mon Sep 17 00:00:00 2001 From: escaleira Date: Fri, 20 May 2022 15:41:29 +0000 Subject: [PATCH] Update 04-merge-conflicts.md --- 04-merge-conflicts.md | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/04-merge-conflicts.md b/04-merge-conflicts.md index 809e423..526520b 100644 --- a/04-merge-conflicts.md +++ b/04-merge-conflicts.md @@ -29,21 +29,16 @@ git checkout master git pull origin master ``` -### 2. Create a new branch to work on the code with conflicts. You can use the review number and patchset as name +### 2. Fetch the patch and create a new branch to work on the code. You can use the review number and patchset as name -```bash -git checkout -b - -``` - -### 3. Pull the patch on the created branch - -(To find the command to execute you can open the corresponding change page on Gerrit UI, click on download menu, then copy the `pull` command.) +(To find the command to execute, you can open the corresponding change page on Gerrit UI, click on download menu, then copy the `Checkout` command.) ```bash -git pull +git fetch && git checkout FETCH_HEAD +git switch -c - ``` -### 4. Make a rebase of your branch against master +### 3. Make a rebase of your branch against master **Note**: use the appropriate branch instead of master @@ -51,9 +46,9 @@ git pull git rebase master ``` -### 5. Fix all conflicts that cannot be resolved manually using your editor +### 4. Fix all conflicts that cannot be resolved manually using your editor -### 6. Add all updated files to the index +### 5. Add all updated files to the index ```bash git add @@ -65,13 +60,13 @@ git add git status ``` -### 7. Continue the rebase process using the following command +### 6. Continue the rebase process using the following command ```bash git rebase --continue ``` -### 8. Submit your change back to the repository +### 7. Submit your change back to the repository **Note**: use the appropriate branch instead of master -- GitLab