$
학습 Linux 안내서
ko
XP:0
퀘스트 148Git Committer
+220 XP

Staging & Committing Code (git add, git commit, git branch)

이 퀘스트를 위한 인터랙티브 터미널 시작→설치 불필요 • 브라우저에서 바로 실행

개념 및 개요

In Git version control, modifications made to working files must be staged before they can be committed into repository history.

- git add : Stages modified files into the index (e.g., git add server.js), preparing them for commit.
- git commit -m "": Records a permanent snapshot of staged changes with a descriptive message (e.g., git commit -m "Fix config").
- git branch: Lists all local repository branches and indicates the currently active branch with an asterisk.

Let's stage and commit code! Stage the modified server configuration with git add server.js, commit it using git commit -m "Fix config", and inspect active branches by running git branch.

명령어 구문 참조

Command / SyntaxDescription
git add server.jsStage modified file for commit
git commit -m "Fix config"Record snapshot with commit message
git branchList local git branches

검증 목표

  • ○
    Stage server.js with git add server.js
  • ○
    Commit changes with git commit -m
  • ○
    Check branches with git branch

퀘스트를 완료할 준비가 되셨나요? 148?