0Pricing
Git Advanced: Monorepo, Submodules & Workflows · 강의

기능 브랜치와 긴급 수정

효과적인 기능 브랜치 전략을 구현하고 운영 환경에 긴급 수정을 신속하게 적용하는 방법을 배웁니다.

기능 브랜치와 긴급 수정은(는) CoddyKit의 무료 Git Advanced: Monorepo, Submodules & Workflows 강의입니다. 이것은 4개 중 3번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 Git Advanced: Monorepo, Submodules & Workflows 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. Git Advanced: Monorepo, Submodules & Workflows 강의에는 총 4개의 강의가 포함되어 있습니다.

이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.

Why Feature Branches?

When working on new features or major changes, it's best to keep them separate from your main codebase. This is where feature branching comes in!

It allows developers to work on new functionality in isolation without affecting the stable version of the project. This prevents half-finished work from breaking the main branch.

Creating a Feature Branch

To start a new feature, you'll create a new branch from your main development line, often main or develop. This creates a separate timeline for your work.

Use the git checkout -b command to create a new branch and switch to it in one go.

git checkout -b my-new-feature

Working in Isolation

Once on your feature branch, you can make changes, add files, and commit as usual. Your commits will only exist on this branch, not on main.

It's good practice to push your feature branch to the remote repository regularly, especially if you're collaborating or want a backup.

git add . 
git commit -m "Implement initial feature UI" 
git push origin my-new-feature

Merging a Feature Branch

After your feature is complete, reviewed, and tested, it's time to integrate it back into the main development branch. You'll switch to the target branch (e.g., main) and then merge your feature branch.

Git will combine the changes. Often, a merge commit is created, showing exactly when the feature was integrated.

git checkout main 
git merge my-new-feature

Cleaning Up Feature Branches

Once a feature branch has been merged and is no longer needed, it's good practice to delete it. This keeps your list of branches tidy and easier to manage.

Remember to delete both the local and remote versions of the branch.

git branch -d my-new-feature 
git push origin --delete my-new-feature

Urgent Fixes: Hotfixes

Sometimes, critical bugs appear in the production environment that need immediate attention. These are called hotfixes.

A hotfix workflow allows you to quickly fix the issue and deploy it, minimizing downtime, without waiting for the next planned feature release.

Branching for a Hotfix

Unlike feature branches, hotfixes are typically branched directly from the production-ready branch (e.g., main or master). This ensures you're fixing the exact code currently in production.

You create a new branch specifically for the hotfix, often named with a prefix like hotfix/.

git checkout main 
git checkout -b hotfix/critical-bug-2023-01

Fix, Commit, Test

On your hotfix branch, you'll apply the necessary changes to resolve the bug. Keep the fix as small and focused as possible to reduce risk.

After making changes, commit them with a clear message and thoroughly test the fix to ensure it solves the problem without introducing new ones.

git add . 
git commit -m "HOTFIX: Fix login issue on production" 
// Run tests here

Deploying & Integrating Hotfixes

Once the hotfix is verified, it needs to be merged back into the production branch (e.g., main) and immediately deployed.

Crucially, the hotfix also needs to be merged into your long-running development branch (e.g., develop) to prevent the bug from reappearing in future releases.

git checkout main 
git merge hotfix/critical-bug-2023-01 
git push origin main 

git checkout develop 
git merge hotfix/critical-bug-2023-01 
git push origin develop

Feature vs. Hotfix Check

You've learned about feature branching and hotfixes. Let's test your understanding!

Summary: Branching for Success

In this lesson, you mastered two essential Git branching strategies:

  • Feature Branching: Ideal for developing new features in isolation, ensuring a stable main codebase. You learned to create, work on, merge, and delete feature branches.
  • Hotfixes: Crucial for quickly addressing critical bugs in production. You saw how to create hotfix branches from production, apply fixes, and merge them back to both production and development lines.

These techniques are vital for managing complex projects and maintaining a smooth development workflow with your team.

자주 묻는 질문

“기능 브랜치와 긴급 수정” 강의는 무료인가요?

네 — “기능 브랜치와 긴급 수정” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 Git Advanced: Monorepo, Submodules & Workflows 강의 전체를 잠금 해제할 수 있습니다. Git Advanced: Monorepo, Submodules & Workflows 강의에는 총 4개의 강의가 포함되어 있습니다.

“기능 브랜치와 긴급 수정”에서 뭘 배우나요?

효과적인 기능 브랜치 전략을 구현하고 운영 환경에 긴급 수정을 신속하게 적용하는 방법을 배웁니다. 브라우저에서 직접 실행하는 실습 코드로 Git Advanced: Monorepo, Submodules & Workflows을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.

Git Advanced: Monorepo, Submodules & Workflows을(를) 시작하는 데 경험이 필요한가요?

사전 경험은 필요하지 않습니다. CoddyKit의 Git Advanced: Monorepo, Submodules & Workflows은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 3번째 강의입니다.

“기능 브랜치와 긴급 수정” 강의는 얼마나 걸리나요?

대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.

이 Git Advanced: Monorepo, Submodules & Workflows 강의에서 코드를 작성하고 실행할 수 있나요?

네. 모든 Git Advanced: Monorepo, Submodules & Workflows 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.

이 강의의 모든 강의

  1. Git Flow와 GitHub Flow
  2. GitLab Flow와 릴리스 관리
  3. 기능 브랜치와 긴급 수정
  4. 트렁크 기반 개발 및 지속적 통합
← Git Advanced: Monorepo, Submodules & Workflows(으)로 돌아가기