Menu
Coddy logo textTech

검사와 정리

무엇이 바뀌었는지 확인하고 작업 트리를 정리하세요 - status, log, diff, clean.

Reading the state of a repository

Before changing anything, you look. git status answers "what is in my working tree right now", git diff shows the exact lines that changed, and git log walks the recorded history. These three are the commands you will run more than any others - most Git sessions start with one of them.

The rest of the category is the specialist kit: git bisect binary-searches history to find the commit that introduced a bug, git tag pins version numbers to release commits, and git clean sweeps untracked build artifacts out of the working tree.

자주 묻는 질문

How do I see what I changed before committing?
git status lists which files changed; git diff shows the actual edited lines. Once files are staged, use git diff --staged to review exactly what the next commit will contain.
How do I view commit history in a readable way?
git log --oneline gives one commit per line. Add --graph --all to draw the branch structure, or filter with --author="name" and -- <file> to see only the history you care about.
How do I remove untracked files from my repo?
Preview first with git clean -n, then delete with git clean -f. Add -d to include untracked directories and -x to also remove ignored files (like build output). There is no undo - untracked files are not in Git’s history.