Git CLI 가이드

41의 명령어를 찾았습니다

git init
repository
새로운 Git 저장소 초기화

예제:

$ git init git init [directory]
init
repository
start
git clone
repository
원격 저장소 복제

예제:

$ git clone [url] git clone [url] [directory] git clone --depth 1 [url]
clone
repository
remote
git add
staging
파일을 스테이징 영역에 추가

예제:

$ git add [file] git add . git add -A
add
stage
track
git commit
commit
스테이징된 변경사항을 커밋

예제:

$ git commit -m "message" git commit -am "message" git commit --amend
commit
save
changes
git push
remote
로컬 변경사항을 원격 저장소에 푸시

예제:

$ git push origin main git push -u origin main git push --force
push
upload
remote
git pull
remote
원격 저장소의 변경사항을 가져와 병합

예제:

$ git pull origin main git pull --rebase origin main
pull
fetch
merge
git fetch
remote
원격 저장소의 변경사항을 가져오기

예제:

$ git fetch origin git fetch --all git fetch --prune
fetch
download
remote
git merge
branch
브랜치 병합

예제:

$ git merge [branch] git merge --no-ff [branch] git merge --abort
merge
combine
branch
git branch
branch
브랜치 관리

예제:

$ git branch git branch [name] git branch -d [name]
branch
create
delete
git checkout
branch
브랜치 전환 또는 파일 복원

예제:

$ git checkout [branch] git checkout -b [branch] git checkout -- [file]
checkout
switch
restore
git status
info
작업 디렉토리 상태 확인

예제:

$ git status git status -s git status --ignored
status
state
check
git log
info
커밋 히스토리 조회

예제:

$ git log git log --oneline git log --graph
log
history
commits
git diff
info
변경사항 비교

예제:

$ git diff git diff [file] git diff HEAD~1
diff
compare
changes
git reset
history
HEAD 위치 변경

예제:

$ git reset HEAD~1 git reset --hard HEAD~1 git reset --soft HEAD~1
reset
revert
undo
git revert
history
커밋 되돌리기

예제:

$ git revert [commit] git revert --no-commit [commit]
revert
undo
reverse
git stash
stash
작업 내용 임시 저장

예제:

$ git stash git stash pop git stash list
stash
save
temporary
git tag
tag
태그 관리

예제:

$ git tag [name] git tag -a [name] -m "message" git tag -l
tag
version
release
git remote
remote
원격 저장소 관리

예제:

$ git remote -v git remote add origin [url] git remote remove origin
remote
repository
origin
git config
config
Git 설정 관리

예제:

$ git config --global user.name "name" git config --list git config --get user.name
config
settings
configure
git clean
cleanup
추적되지 않는 파일 제거

예제:

$ git clean -n git clean -f git clean -fd
clean
remove
untracked
git rm
file
파일 삭제

예제:

$ git rm [file] git rm --cached [file] git rm -r [directory]
remove
delete
file
git mv
file
파일 이동 또는 이름 변경

예제:

$ git mv [old] [new] git mv -f [old] [new]
move
rename
file
git show
info
객체 정보 표시

예제:

$ git show [commit] git show [branch] git show [tag]
show
display
view
git blame
info
파일의 각 줄의 변경 이력 조회

예제:

$ git blame [file] git blame -L 10,20 [file]
blame
history
line
git bisect
debug
이진 탐색으로 버그 찾기

예제:

$ git bisect start git bisect good [commit] git bisect bad [commit]
bisect
debug
bug
git cherry-pick
commit
특정 커밋 적용

예제:

$ git cherry-pick [commit] git cherry-pick -x [commit]
cherry-pick
apply
commit
git rebase
branch
브랜치 재배치

예제:

$ git rebase [branch] git rebase -i HEAD~3 git rebase --abort
rebase
reapply
branch
git submodule
module
하위 모듈 관리

예제:

$ git submodule add [url] git submodule update git submodule init
submodule
module
dependency
git worktree
worktree
작업 트리 관리

예제:

$ git worktree add [path] [branch] git worktree list git worktree remove [path]
worktree
workspace
directory
git filter-branch
history
브랜치 재작성

예제:

$ git filter-branch --env-filter '...' git filter-branch --tree-filter '...'
filter
rewrite
history
git gc
maintenance
저장소 최적화

예제:

$ git gc git gc --aggressive git gc --auto
gc
garbage
collection
git fsck
maintenance
저장소 무결성 검사

예제:

$ git fsck git fsck --full git fsck --unreachable
fsck
check
verify
git reflog
history
참조 로그 조회

예제:

$ git reflog git reflog show [ref] git reflog expire
reflog
reference
log
git notes
notes
커밋에 메모 추가

예제:

$ git notes add git notes show [commit] git notes remove [commit]
notes
comment
memo
git archive
archive
파일 아카이브 생성

예제:

$ git archive --format=zip HEAD git archive --format=tar HEAD
archive
zip
tar
git bundle
bundle
저장소 번들 생성

예제:

$ git bundle create repo.bundle HEAD git bundle verify repo.bundle
bundle
package
archive
git daemon
daemon
Git 데몬 실행

예제:

$ git daemon --base-path=/path/to/repo git daemon --export-all
daemon
server
service
git instaweb
web
Git 웹 인터페이스 실행

예제:

$ git instaweb --start git instaweb --stop
web
interface
browser
git mergetool
merge
병합 충돌 해결 도구 실행

예제:

$ git mergetool git mergetool --tool=vimdiff
merge
tool
conflict
git p4
integration
Perforce 저장소와 상호작용

예제:

$ git p4 clone [p4 depot path] git p4 submit
p4
perforce
integration
git svn
integration
Subversion 저장소와 상호작용

예제:

$ git svn clone [svn repo] git svn rebase
svn
subversion
integration