Git - Version Control
Branching strategy
We follow GitFlow branching strategy.
Learn more about GitFlow from following links
- GitFlow in GitKraken
- https://www.youtube.com/watch?v=1SXpE08hvGs
- https://www.youtube.com/watch?v=qhpGPvClEcw
- https://www.gitkraken.com/learn/git/git-flow
GitFlow Branch Naming Conventions
Feature Branch Names
Your feature branch name should be your task slug, eg:
If your task is:
Task #6123 - Registration Page
Your feature
branch name should be:
feature/task-61-registration-page
Release & Hotfix Branch Names
Release & Hotfix branch name must be your software's semantic version.
Eg:
release/v1.0.1
release/v2.0.1
hotfix/v2.1.1
hotfix/v1.1.0
If you don't know about semantic versioning, please learn more from following video:
How to decide which version number to change?
You should update the minor
(x.<update-this>.0
) if there is not database
change or update major
(<update-this>.0.0
) version in config.php
and composer.json
of module & theme
Semantic Commit Messages & Changelog
Semantic commit messages can be extremely beneficial for maintaining a meaningful changelog & release notes eg:
Many open-source softwares are following a similar approach eg:
- https://github.com/nuxt/framework/releases
- https://github.com/adonisjs/core/releases
- https://github.com/vuejs/vue/blob/main/CHANGELOG.md
Learn more at:
Cloning and project setup
To be updated
Moving Gitlab Repositories To Other Gitlab:
- Use Gitlab Import feature
- If you want to update the recent commits with already imported repository then use
Mirror Repository
feature. - Transfer all CI Variables
- Copy list of all runner using command
sudo cat /etc/gitlab-runner/config.toml
Point Cloned Repositories to Other Gitlab
We're updating our gitlab url, hence you will not be able to commit to git5.webreinvent.com
repositories instead you need to point all your cloned repositories to git6.webreinvent.com
.
Read the all instructions and carefully
1. Sign up
Sign up at https://git6.webreinvent.com/users/sign_up
use your official email
& password
to sign up. Username
should be the prefix of your email eg. if your email is subrat.b001@webreinvent.com
then your username
will be subrat.b001
.
OR
1. Sign In
Sign in at https://git6.webreinvent.com/users/sign_up
if you already have account.
2. Add SSH Key
Video Tutorials:
https://drive.google.com/file/d/1A3wNCtYG2p_iw91GcZKyhVxjOwpqYx9Y/view
3. Change origin
url of cloned repository
Video Tutorials:
https://drive.google.com/file/d/1DC0CCvwz_SN5Wxa_bT8cdu_DcoN0YeZ7/view
You need to change the origin
url of all your cloned repositories as well as sub module
repositories;
Errors
Configured SSH Key is invalid
This is because your Gitkraken
SSH is not added in your gitlab account Or both are different
Solution
Add your SSH key again:
https://drive.google.com/file/d/1A3wNCtYG2p_iw91GcZKyhVxjOwpqYx9Y/view