무료 변환기

힘내 명령 치트 시트

포괄적인 Git 명령 치트 시트. 예제, 설명, 원클릭 복사가 포함된 80개 이상의 필수 Git 명령을 검색하세요.

git config --global user.name
Set the global username for commits
예:git config --global user.name "Your Name"
git config --global user.email
Set the global email for commits
예:git config --global user.email "[email protected]"
git config --list
List all Git configuration settings
예:git config --list
git config --global core.editor
Set the default text editor for Git
예:git config --global core.editor "vim"
git init
Initialize a new Git repository in the current directory
예:git init my-project
git clone
Clone a remote repository to your local machine
예:git clone https://github.com/user/repo.git
git clone --depth
Shallow clone with limited history
예:git clone --depth 1 https://github.com/user/repo.git
git add
Stage a specific file for the next commit
예:git add src/index.js
git add .
Stage all modified and new files in the current directory
예:git add .
git add -p
Interactively stage parts (hunks) of changed files
예:git add -p
git status
Show the working tree status (staged, unstaged, untracked)
예:git status
git status -s
Show a compact status summary
예:git status -s
git diff
Show unstaged changes between working tree and index
예:git diff src/app.js
git diff --staged
Show staged changes that will go into the next commit
예:git diff --staged
git restore
Discard changes in the working directory
예:git restore src/index.js
git restore --staged
Unstage a file (remove from staging area)
예:git restore --staged src/index.js
git rm
Remove a file from the working tree and index
예:git rm old-file.txt
git mv
Move or rename a file and stage the change
예:git mv oldname.js newname.js
git commit -m
Record staged changes with a commit message
예:git commit -m "feat: add login page"
git commit -am
Stage all tracked files and commit in one step
예:git commit -am "fix: correct typo in README"
git commit --amend
Modify the most recent commit (message or content)
예:git commit --amend -m "Updated commit message"
git log
Show the commit history for the current branch
예:git log --oneline --graph
git log --oneline
Show compact one-line commit history
예:git log --oneline -20
git log --author
Filter commit history by author
예:git log --author="Alice" --oneline
git log --since
Show commits after a given date
예:git log --since="2024-01-01" --oneline
git show
Show details of a specific commit
예:git show abc1234
git diff HEAD
Show all changes since the last commit
예:git diff HEAD
git shortlog
Summarize commit history grouped by author
예:git shortlog -sn
git branch
List all local branches
예:git branch -a
git branch <name>
Create a new branch at the current commit
예:git branch feature/login
git branch -d
Delete a merged local branch
예:git branch -d feature/login
git branch -D
Force-delete a branch regardless of merge status
예:git branch -D old-branch
git branch -m
Rename the current branch
예:git branch -m new-branch-name
git checkout
Switch to an existing branch
예:git checkout main
git checkout -b
Create and switch to a new branch
예:git checkout -b feature/new-ui
git switch
Switch to an existing branch (modern syntax)
예:git switch main
git switch -c
Create and switch to a new branch (modern syntax)
예:git switch -c feature/api-v2
git merge
Merge a branch into the current branch
예:git merge feature/login
git merge --no-ff
Merge with a merge commit even if fast-forward is possible
예:git merge --no-ff feature/login
git rebase
Reapply commits on top of another branch
예:git rebase main
git rebase -i
Interactive rebase to squash, reorder, or edit commits
예:git rebase -i HEAD~3
git remote -v
List remote connections with their URLs
예:git remote -v
git remote add
Add a new remote repository connection
예:git remote add origin https://github.com/user/repo.git
git remote remove
Remove a remote connection
예:git remote remove origin
git remote set-url
Change the URL of an existing remote
예:git remote set-url origin [email protected]:user/repo.git
git fetch
Download objects and refs from a remote without merging
예:git fetch origin
git fetch --all
Fetch from all remotes
예:git fetch --all
git pull
Fetch and integrate changes from a remote branch
예:git pull origin main
git pull --rebase
Pull and rebase instead of merge
예:git pull --rebase origin main
git push
Upload local commits to a remote branch
예:git push origin main
git push -u
Push and set upstream tracking branch
예:git push -u origin feature/login
git push --force-with-lease
Force push safely (fails if remote has new commits)
예:git push --force-with-lease origin feature/login
git push --delete
Delete a remote branch
예:git push origin --delete old-branch
git stash
Temporarily save uncommitted changes to a stack
예:git stash push -m "WIP: half-done feature"
git stash pop
Apply the most recent stash and remove it from the stack
예:git stash pop
git stash apply
Apply a stash without removing it from the stack
예:git stash apply stash@{0}
git stash list
List all stashed changes
예:git stash list
git stash drop
Remove a specific stash entry
예:git stash drop stash@{1}
git stash clear
Remove all stashed entries
예:git stash clear
git stash show
Show a summary of changes in a stash
예:git stash show -p stash@{0}
git stash branch
Create a branch from a stash
예:git stash branch feature/stashed stash@{0}
git tag
List all existing tags
예:git tag -l "v1.*"
git tag <name>
Create a lightweight tag at the current commit
예:git tag v1.0.0
git tag -a
Create an annotated tag with a message
예:git tag -a v1.0.0 -m "Release version 1.0.0"
git tag -d
Delete a local tag
예:git tag -d v1.0.0-beta
git push --tags
Push all local tags to the remote
예:git push origin --tags
git push origin <tag>
Push a specific tag to the remote
예:git push origin v1.0.0
git describe
Show the most recent tag reachable from the current commit
예:git describe --tags --abbrev=0
git reset --soft
Move HEAD back, keep changes staged
예:git reset --soft HEAD~1
git reset --mixed
Move HEAD back, unstage changes (default)
예:git reset HEAD~1
git reset --hard
Move HEAD back and discard all changes
예:git reset --hard HEAD~1
git revert
Create a new commit that undoes a previous commit
예:git revert abc1234
git revert --no-commit
Revert changes without creating a commit yet
예:git revert --no-commit abc1234
git clean -fd
Remove untracked files and directories
예:git clean -fd
git clean -n
Dry run: show what would be removed by clean
예:git clean -n
git checkout -- <file>
Restore a file to the last committed state
예:git checkout -- src/index.js
git cherry-pick
Apply a specific commit from another branch
예:git cherry-pick abc1234
git cherry-pick -n
Cherry-pick without committing (stage only)
예:git cherry-pick -n abc1234
git bisect start
Start a binary search to find a bug-introducing commit
예:git bisect start && git bisect bad && git bisect good v1.0
git bisect good/bad
Mark a commit as good or bad during bisect
예:git bisect good
git reflog
Show the history of HEAD and branch tip movements
예:git reflog --date=iso
git submodule add
Add a repository as a submodule
예:git submodule add https://github.com/user/lib.git libs/lib
git submodule update
Initialize and update all submodules
예:git submodule update --init --recursive
git worktree add
Check out a branch in a new working directory
예:git worktree add ../hotfix hotfix/critical
git blame
Show who last modified each line of a file
예:git blame -L 10,20 src/app.js
git archive
Create a zip/tar archive of a tree
예:git archive --format=zip HEAD > release.zip

이 도구에 대하여

git 명령에 대한 포괄적인 빠른 참조 가이드입니다. 일반적으로 사용되는 명령, 구문, 예제를 범주별로 정리하여 찾아보세요. 검색 가능하고 모바일 친화적입니다. 빠른 알림이 필요할 때 즉시 액세스할 수 있도록 이 페이지를 북마크에 추가하세요.

사용 방법

  1. 분류된 참조 섹션을 찾아보세요.
  2. 검색창을 사용하여 특정 명령이나 구문을 찾으세요.
  3. 사용 예와 설명을 보려면 항목을 클릭하세요.
  4. 터미널이나 편집기에서 사용할 수 있도록 명령을 직접 복사하세요.

자주 묻는 질문

이 참조가 최신인가요?
이 참조는 여러 버전에서 안정적으로 널리 사용되는 명령과 구문을 다루고 있습니다. 최신 추가 사항이나 버전별 기능에 대해서는 공식 문서를 확인하세요.
이것을 오프라인으로 사용할 수 있나요?
페이지가 로드되면 인터넷 연결 없이도 페이지가 작동합니다. 빠른 액세스를 위해 북마크에 추가하세요. 추가 네트워크 요청 없이 모든 콘텐츠가 브라우저에서 렌더링됩니다.
이것은 포괄적입니까, 아니면 단지 기본입니까?
일상적인 작업의 90%를 처리하는 가장 일반적으로 사용되는 명령과 패턴을 다룹니다. 틈새 또는 고급 기능에 대해서는 공식 문서를 참조하세요.
추가 사항을 제안할 수 있나요?
우리는 정기적으로 참조를 업데이트합니다. 누락된 명령을 발견했거나 제안 사항이 있는 경우 연락처 페이지를 통해 알려주십시오.