-
Annegrät Daujeumont authored
- /external/contribute/supersede/img/img5.png - /external/contribute/supersede/supersede.md
Annegrät Daujeumont authored- /external/contribute/supersede/img/img5.png - /external/contribute/supersede/supersede.md
layout: page
permalink: /external/contribute/supersede/
shortcut: contribute:supersede
redirect_from:
- /cards/contribute:supersede
- /external/cards/contribute:supersede
- /contribute/supersede
- /external/external/contribute/supersede/
Take over a stale merge request
In some cases, it might be useful to move the Merge Request of a branch opened by someone else to your own fork.
- Open Visual Studio Code.
- Select the develop branch and synchronize it.
- In Terminal, click on New Terminal.
Steps 4 and 5 needs to be performed only the first time.
-
If not done yet, configure the git mr command by following those instructions.
4.1 Open Git Bash
4.2 Type vim ~/.gitconfig - Enter
4.3 Type i
4.4 Type
[alias]
mr = !sh -c 'git fetch $1 merge-requests/$2/head:mr-$1-$2 && git checkout mr-$1-$2' -
4.5 Type :wq
-
In the Terminal window, type git remote add upstream [paste the SSH Key]. You can copy the SSH key of the repository by clicking on Clone - copy on the repository page.
-
In the Terminal window, type git mr upstream [number of the merge request].
You are now on the branch of the merge request.
-
Push it to your fork by clicking on the cloud icone on the bottom left of your screen.
-
On GitLab, open a new Merge Request with the newly created branch.
In description, write Supersedes ![number of the original MR].
-
In the original MR, write in the description Superseded by ![number of the newly created MR] and close the MR.