Dev Patrache

Git-Spickzettel

설정

Safe
git config --global user.name "이름"

사용자 이름 설정

git config --global user.name "Sam"

Safe
git config --global user.email "이메일"

이메일 설정

git config --global user.email "sam@example.com"

Safe
git config --list

모든 설정 확인

git config --list

시작

Safe
git init

새 저장소 초기화

git init my-project

Safe
git clone <url>

원격 저장소 복제

git clone https://github.com/user/repo.git

변경 사항

Safe
git status

작업 디렉토리 상태

git status

Safe
git diff

변경 사항 비교

git diff HEAD~1

Safe
git add <file>

스테이징에 추가

git add . / git add file.txt

Safe
git commit -m "메시지"

커밋 생성

git commit -m "feat: 새 기능"

Caution
git commit --amend

마지막 커밋 수정

git commit --amend -m "수정된 메시지"

Safe
git stash

변경 사항 임시 저장

git stash / git stash pop

브랜치

Safe
git branch

브랜치 목록

git branch -a

Safe
git branch <name>

새 브랜치 생성

git branch feature/login

Safe
git checkout <branch>

브랜치 전환

git checkout main

Safe
git checkout -b <name>

생성 + 전환

git checkout -b feature/login

Caution
git merge <branch>

브랜치 병합

git merge feature/login

Caution
git branch -d <name>

브랜치 삭제

git branch -d feature/login

Danger
git branch -D <name>

브랜치 강제 삭제

git branch -D feature/login

원격

Safe
git remote -v

원격 저장소 목록

git remote -v

Safe
git fetch

원격 변경 가져오기

git fetch origin

Caution
git pull

가져오기 + 병합

git pull origin main

Caution
git push

원격에 전송

git push origin main

Danger
git push --force

강제 푸시

git push --force origin main

되돌리기

Caution
git restore <file>

파일 변경 취소

git restore file.txt

Safe
git reset HEAD <file>

스테이징 취소

git reset HEAD file.txt

Safe
git revert <commit>

커밋 되돌리기 (새 커밋)

git revert abc123

Caution
git reset --soft HEAD~1

마지막 커밋 취소 (변경 유지)

git reset --soft HEAD~1

Danger
git reset --hard HEAD~1

마지막 커밋 삭제 (변경 삭제)

git reset --hard HEAD~1

조회

Safe
git log

커밋 이력

git log --oneline --graph

Safe
git log --oneline

한줄 이력

git log --oneline -10

Safe
git show <commit>

커밋 상세

git show abc123

Safe
git blame <file>

줄별 작성자

git blame file.txt

Safe
git reflog

HEAD 이력 (복구용)

git reflog

Zuletzt aktualisiert: 2026 · Kostenloses Online-Tool

Was ist Git-Spickzettel?

Durchsuchbarer Git-Befehlsspickzettel nach Kategorien geordnet mit Gefahrenstufenangabe

Anleitung

  1. 1
    Kategorie wählen — Wählen Sie eine Kategorie wie Konfiguration, Branch oder Rückgängig.
  2. 2
    Suchen — Suchen Sie nach Befehl oder Beschreibung.
  3. 3
    Gefahrenstufe prüfen — Rote Befehle können Datenverlust verursachen — mit Vorsicht verwenden.
  4. 4
    Kopieren — Kopieren Sie den benötigten Befehl und verwenden Sie ihn im Terminal.

Verwandte Tools

Häufig gestellte Fragen

Über 35 Befehle in 7 Kategorien: Konfiguration, Start, Änderungen, Branch, Remote, Rückgängig und Ansicht.

Sicher (grün) bedeutet kein Datenverlust, Vorsicht (gelb) bedeutet Aufmerksamkeit nötig, Gefahr (rot) bedeutet möglicher Datenverlust.

Ja, verwenden Sie die Kopierschaltfläche bei jedem Befehl, um ihn in die Zwischenablage zu kopieren.

Ja, moderne Befehle wie git restore und git switch sind enthalten.

Ja, alle Daten sind statisch enthalten und funktionieren offline.

Diese Website verwendet Cookies für eine bessere Nutzererfahrung und Werbung. Mehr erfahren