Skip to content
Snippets Groups Projects
Commit 343bcfc7 authored by Laurent Heirendt's avatar Laurent Heirendt :airplane:
Browse files

Merge branch 'ad-creation-supersede-a-mr' into 'develop'

Ad creation supersede a mr

See merge request !483
parents 157e56a7 af29ef48
No related branches found
No related tags found
No related merge requests found
external/contribute/supersede/img/img1.png

132 KiB

external/contribute/supersede/img/img2.png

48.4 KiB

external/contribute/supersede/img/img3.png

115 KiB

external/contribute/supersede/img/img4.png

15.6 KiB

external/contribute/supersede/img/img5.png

2.83 KiB

---
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.
1. Open *Visual Studio Code*.
2. Select the ***develop*** branch and synchronize it.
3. In ***Terminal***, click on ***New Terminal***.
<div align="center">
<img src="img/img1.png" width="700">
</div>
**Steps 4 and 5 needs to be performed only the first time.**
4. If not done yet, configure the git mr command by following those [instructions](https://docs.gitlab.com/ee/user/project/merge_requests/reviews/#checkout-locally-by-adding-a-git-alias).
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' -
<div align="center">
<img src="img/img5.png" width="700">
</div>
4.5 Type *:wq*
5. 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.
<div align="center">
<img src="img/img3.png" width="700" >
</div>
<div align="center">
<img src="img/img2.png" width="300" >
</div>
6. In the *Terminal window*, type *git mr upstream [number of the merge request]*.
You are now on the branch of the merge request.
7. Push it to your fork by clicking on the cloud icone on the bottom left of your screen.
<div align="center">
<img src="img/img4.png" width="100" >
</div>
8. On GitLab, open a new Merge Request with the newly created branch.
In description, write ***Supersedes ![number of the original MR]***.
9. In the original MR, write in the description ***Superseded by ![number of the newly created MR]*** and close the MR.
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment