GitLab Basics
- GitLab - Squashing Commits
- GitLab - Rebase Operation
- GitLab - Add a File
- GitLab - Create a Branch
- GitLab - Fork a Project
- GitLab - Create Project
- GitLab - SSH Key Setup
- GitLab - Git Commands
- GitLab - Installation
- GitLab - Introduction
GitLab Users and Groups
GitLab Issue Tracker
- GitLab - Wiki Pages
- GitLab - Milestones
- GitLab - Referencing Issues
- GitLab - Merge Requests
- GitLab - Create Issue
GitLab Instance Management
GitLab Continuous Integration
- GitLab CI - Container Registry
- GitLab CI - Cycle Analytics
- GitLab CI - Advanced usage of CI
- Configuring GitLab Runners
- GitLab CI - Permissions
- GitLab - CI/CD Variables
- GitLab - CI/CD
- GitLab CI - Introduction
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
GitLab - Referencing Issues
GitLab can be able to refer the specific issue from the commit message to solve a specific problem. In this chapter, we will discuss about how to reference a issue in the GitLab −
Step 1 − To reference a issue, you need to have an issue number of a created issue. To create an issue, refer the
chapter.Step 2 − To see the created issue, cpck on the List option under Issues tab −
Step 3 − Before making the changes in your local repository, check whether it is up to date or not by using the below command −
git checkout master && git pull
The git pull command downloads the latest changes from the remote server and integrates directly into current working files.
Step 4 − Now, create a new branch with the name issue-fix by using the git checkout command −
git checkout -b issue-fix
Step 5 − Now, add some content to the README.md file to fix the bug −
echo "fix this bug" >> README.md
Step 6 − Enter the commit message for the above change with the below command −
git commit -a
This command opens the below screen and press Insert key on the keyboard to add a commit message for the issue-fix branch.
Now press the Esc key, then colon(:) and type wq to save and exit from the screen.
Step 7 − Now push the branch to remote repository by using the below command −
git push origin issue-fix
Step 8 − Login to your GitLab account and create a new merge request. You can refer the
chapter for the creation of merge request.Step 9 − Once you create the merge request, you will be redirected to the merge request page. When you cpck on the Close merge request button (refer the screenshot in the step (6) of
chapter), you will see the Closed option after closing merge request. Advertisements