0Pricing
Git Advanced: Monorepo, Submodules & Workflows · レッスン

GitLab Flowとリリース管理

GitLab Flowについて学び、CI/CDとの統合や効率的なリリース管理の実践方法に焦点を当てます。

「GitLab Flowとリリース管理」はCoddyKit上の無料Git Advanced: Monorepo, Submodules & Workflowsレッスンです。 これはレッスン2/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これはGit Advanced: Monorepo, Submodules & Workflows学習パスの一部であり、ウェブとCoddyKitアプリ全体で進捗が同期されます。 Git Advanced: Monorepo, Submodules & Workflowsコースには全4レッスンが含まれています。

このレッスンの一部はまだ翻訳されておらず、英語で表示されています。

What is GitLab Flow?

The GitLab Flow is a streamlined Git workflow that combines feature-driven development with release management and CI/CD integration.

It's designed to be simple, effective, and to work seamlessly with GitLab's built-in features like Merge Requests and pipelines.

Main Branch & Environments

At its heart, GitLab Flow uses a single main branch (often named main or master) as the source of truth.

  • Feature branches: All new work happens here.
  • Environment branches: Dedicated branches (e.g., pre-production, production) track deployed code.
  • CI/CD: Heavily integrated to automate testing and deployments.

Developing New Features

When starting new work, you'll create a feature branch directly from the main branch. This keeps your main branch stable.

Naming conventions are key, like feature/add-user-profile or bugfix/fix-login-error.

Here's how you might start a new feature:

git checkout main
git pull origin main
git checkout -b feature/new-dashboard

Code Review with MRs

Once your feature is complete on its branch, you open a Merge Request (MR) to merge it back into main.

MRs are central to GitLab Flow:

  • They trigger CI/CD pipelines for testing.
  • They facilitate code review by your teammates.
  • They track discussions and approvals.

Deploying to Staging

After a feature branch is merged into main, the main branch itself is often deployed to a staging environment automatically by CI/CD.

This allows for final testing in an environment that closely mirrors production before the code goes live.

The main branch is always deployable.

The Production Branch

For production deployments, GitLab Flow often uses a dedicated production branch. This branch only contains code that has been successfully deployed to the live environment.

When main is ready for production, you merge main into production, which triggers a production deployment.

git checkout production
git pull origin production
git merge main
git push origin production

Marking Releases with Tags

When a deployment to production is successful, it's good practice to create a Git tag on the production branch.

Tags act as permanent markers for specific release versions (e.g., v1.0.0, v1.0.1). They help you easily refer back to a released state.

git checkout production
git tag -a v1.0.0 -m "Release version 1.0.0"
git push origin v1.0.0

Handling Hotfixes

If a critical bug is found in production, a hotfix is needed. In GitLab Flow, hotfixes are typically handled by creating a branch directly from the production branch.

Once fixed, it's merged back into production (triggering redeploy) and then also merged into main to ensure main is up-to-date.

CI/CD at its Core

The true power of GitLab Flow comes from its tight integration with CI/CD pipelines.

  • Automated Tests: Every push to a feature branch runs tests.
  • Deployment Automation: Merges to main or production can automatically deploy.
  • Quality Gates: Pipelines can prevent merges if tests fail or code quality is low.

GitLab Flow Check

Consider the typical structure of GitLab Flow.

Recap: GitLab Flow

You've explored the GitLab Flow, a robust workflow for continuous integration and delivery.

  • It uses a stable main branch.
  • Feature development happens on separate branches.
  • Merge Requests drive code review and CI/CD.
  • Dedicated environment branches (like production) ensure smooth releases.
  • Hotfixes are handled by branching from production.

This flow is ideal for teams leveraging GitLab's full suite of features.

よくある質問

「GitLab Flowとリリース管理」レッスンは無料ですか?

はい。「GitLab Flowとリリース管理」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、Git Advanced: Monorepo, Submodules & Workflowsコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 Git Advanced: Monorepo, Submodules & Workflowsコースには全4レッスンが含まれています。

「GitLab Flowとリリース管理」で何を学びますか?

GitLab Flowについて学び、CI/CDとの統合や効率的なリリース管理の実践方法に焦点を当てます。 ブラウザで直接実行するハンズオンコードでGit Advanced: Monorepo, Submodules & Workflowsを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。

Git Advanced: Monorepo, Submodules & Workflowsを始めるのに経験は必要ですか?

事前経験は必要ありません。CoddyKitのGit Advanced: Monorepo, Submodules & Workflowsは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン2/4です。

「GitLab Flowとリリース管理」レッスンにはどのくらい時間がかかりますか?

ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。

このGit Advanced: Monorepo, Submodules & Workflowsレッスンでコードを書いて実行できますか?

はい。すべてのGit Advanced: Monorepo, Submodules & Workflowsレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。

このコースのすべてのレッスン

  1. Git FlowとGitHub Flowの比較
  2. GitLab Flowとリリース管理
  3. フィーチャーブランチとホットフィックス
  4. Trunk-Based Developmentと継続的インテグレーション
← Git Advanced: Monorepo, Submodules & Workflowsに戻る