GitLab is a Git repository which covers the entire DevOps Lifecycle.
- create a
dev
branch; it will be forked byfeature
branches - make
dev
aProtected branch
andDefault branch
- add
Milestones
andLabels
(eg.To Do
,Doing
,QA
,Rejected
) - add
.gitignore
- invite GitLab members
- Review the milestones.
- Review and/or create an issue (task).
- Take a task from the
Issue Board
's'To Do
pile and put it into theDoing
pile. - Assign the chosen task to yourself.
- Take a task from the
- Create a
New branch and merge request
withdev
as its source; click on theV
arrow. Check out branch
and doStep 1: Fetch and check out...
in your terminal.- Construct software and put knowledge to paper.
- In issues: ask questions, find microtasks (require up to 15min of effort) and bugs. Solve them.
- Stage all your work with
git add .
. - Commit your work with
git commit -m 'Descriptive commit message'
. - Push it to a remote branch with
git push
. - Resolve merge conflicts.
- Click
Mark as ready
. - Complete the merge request by pressing
Merge
and ticking the boxDelete source branch
. - Repeat until the task or milestone are complete.
GitLab workflow ties together GitLab and Git:
- milestones
- issues
- branches
- merge requests
- git
- CICD
# Note: for publishing Jekyll `GitLab Pages`
image: ruby:2.6.5 # Docker image
pages: # job name
stage: deploy # stage name
script: # what should be run
- bundle install # install dependencies
- bundle exec jekyll build -d public # build the website in "public"
artifacts:
paths:
- public # location of the website
only:
- pages # run job only after pushing to the "pages" branch
If a GitLab project is private then:
- the public only see public GitLab pages
- Guest permission users:
- DO see: activity, issues, wiki pages
- DON'T see: code, branches, commits, confidential issues, merge requests
- higher permission users can see almost everything
Settings -> General -> Advanced -> Export
New Project -> Import project -> select export type -> follow instructions ...
User Settings -> Access Tokens
To use Git over SSH you need to:
- generate and add an SSH key
- setup Git over SSH
Check if you are using Git over SSH:
$: git remote -v # ->
# origin git@_domain:path/to/file.git (fetch)
# origin git@_domain:path/to/file.git (push)