-o merge_request.create
-o merge_request.target=my-target-branch
-o merge_request.label="Label with spaces"
IT1901 Fall 2020 - 14th Lecture
Git
basic workflow recap
working with branches
code review
GitLab
Issues
Milestones
Merge requests
Issues / MR Templates
work on main branch (master)
could be usable for individual / very small teams
prone to conflicts
working with a shared project
git clone
git pull
git status
git add …
git commit …
git push
when same files (lines) are changed by different devs
automatic merge is not possible
we need to solve that to be able to push our changes
git config merge.tool vimdiff
git config merge.conflictstyle diff3
git config mergetool.prompt false
git mergetool
:wqa
save and exit from vi
git commit -m "message"
git clean
remove file (might remove other untracked files)
one can plan ahead what issues should be worked on in parralel to minimize the chance of conflicts
when working on a feature branch, keeping up to date with relevant branches (master or other branch we depend upon) can reduce the risk of getting conflicts
keep master only for finished work
uses branches for development work
when a feature branch is done it is merged into master
git clone
git pull
git checkout -b <branch_name>
git status
+ git add …
+ git commit …
git checkout master
git merge <branch_name>
git push
keep master only for finished work
uses branches for development work
when a feature branch is done a merge request is created
code review takes place and more commits happen to address the comments
the branch is finally merged into master
push options
-o merge_request.create
-o merge_request.target=my-target-branch
-o merge_request.label="Label with spaces"
uses 2 long lived main branches - master
and develop
shorter lived branches for features
, releases
and hotfixes
Issues
Milestones
Task lists
Labels
Boards
Quick actions
Issue templates
Merge request templates