📝

Git-Befehlsreferenz

Comprehensive Git commands reference Guide. Quick lookup für Git commands, syntax, und usage examples.

Praxisleitfaden
Git-Befehle
Grundlegend Operations14
BefehlVerwendung
git init [repository-name]
Initialize ein new Git repository
git init [repository-name]
git clone <repository-url>
Clone ein remote repository locally
git clone <repository-url>
git status
View current branch Statut
git status
git diff
View tracked file changes
git diff
git hinzufügen <Fichier>
Hinzufügen specified Fichier zu staging area
git hinzufügen <Fichier>
git hinzufügen .
Hinzufügen alle Modifié Fichiers zu staging area
git hinzufügen .
git commit -ein
Commit alle local modifications
git commit -ein
git commit -m "xxx"
Commit Fichiers hinzugefügt zu staging area mit xxx als commit message
git commit -m "xxx"
git commit --amend -m "xxx"
Modify Letzte commit (tun nicht verwenden zu modify published commits)
git commit --amend -m "xxx"
git commit -am "xxx"
Shortcut für git hinzufügen . und git commit -m "xxx"
git commit -am "xxx"
git stash
Stash current modifications, set alle zu HEAD État
git stash
git stash list
View alle stash list
git stash list
git stash push
Stash current working Répertoire Fichiers zu temporary Leerzeichen
git stash push
git stash pop
Restore Fichiers von temporary Leerzeichen zu current working Répertoire
git stash pop
Commit History8
BefehlVerwendung
git log
View commit log
git log
git log -n
Anzeigen n lines von Journal, wo n ist ein integer
git log -n
git log --stat
View local commit log
git log --stat
git show <commit>
View commit Journal und related changed Fichiers
git show <commit>
git show HEAD
View HEAD commit log
git show HEAD
git show HEAD^
View HEAD^ commit log
git show HEAD^
git blame <file>
View die Letzte modifier für jede line von ein Fichier
git blame <file>
git whatchanged
Show commit history und changed files
git whatchanged
Branches & Tags16
BefehlVerwendung
git branch
View local branches
git branch
git branch -r
View remote branches
git branch -r
git branch -ein
View alle branches (local und remote)
git branch -ein
git branch --merged
View branches merged zu current branch
git branch --merged
git branch --nein-merged
View branches nicht merged zu current branch
git branch --nein-merged
git branch -m <new-branch>
Rename current branch zu new-branch
git branch -m <new-branch>
git branch -M <new-branch>
Force rename current branch zu new-branch
git branch -M <new-branch>
git branch -m <old-branch> <new-branch>
Rename old-branch zu new-branch
git branch -m <old-branch> <new-branch>
git branch -M <old-branch> <new-branch>
Force rename old-branch zu new-branch
git branch -M <old-branch> <new-branch>
git checkout <branch-name>
Switch zu specified branch
git checkout <branch-name>
git branch <new-branch>
Erstellen new branch
git branch <new-branch>
git branch --track <new> <remote>
Erstellen und track remote branch
git branch --track <new> <remote>
git branch -d <branch-name>
Delete local branch
git branch -d <branch-name>
git Tag
List alle local Tags
git Tag
git Tag <Tag-name>
Erstellen Tag based auf latest commit
git Tag <Tag-name>
git Tag -d <Tag-name>
Delete Tag
git Tag -d <Tag-name>
Entfernen Commands3
BefehlVerwendung
git rm <file>
Entfernen Fichier von working Répertoire und staging area
git rm <file>
git rm -r <directory>
Recursively entfernen Répertoire
git rm -r <directory>
git rm --cached <file>
Stoppen tracking Datei, do not Löschen von disk
git rm --cached <file>
Merge & Rebase6
BefehlVerwendung
git merge <branch>
Merge specified branch zu current branch
git merge <branch>
git rebase <branch>
Rebase current branch auf specified branch
git rebase <branch>
git rebase --abort
Abort ongoing rebase operation
git rebase --abort
git rebase --continue
Continue rebase nach resolving conflicts
git rebase --continue
git mergetool
Verwenden configured mergetool zu resolve conflicts
git mergetool
git hinzufügen <resolved-Fichier> git rm <resolved-Fichier>
Manually resolve merge conflicts
git hinzufügen <resolved-Fichier> git rm <resolved-Fichier>
Undo Commands11
BefehlVerwendung
git reset --hard HEAD
Zurücksetzen zu HEAD, discard alle changes
git reset --hard HEAD
git reset <commit>
Zurücksetzen zu specified commit
git reset <commit>
git reset --hard <commit>
Force Zurücksetzen zu specified commit, discard alle changes
git reset --hard <commit>
git reset --merge <commit>
Zurücksetzen merge operation
git reset --merge <commit>
git reset --keep <commit>
Zurücksetzen aber keep uncommitted local changes
git reset --keep <commit>
git revert <commit>
Revert specified commit
git revert <commit>
git restore <file>
Restore file zu last committed state
git restore <file>
git checkout -- <file>
Same als git restore <Fichier>
git checkout -- <file>
git checkout HEAD <file>
Restore Datei von HEAD
git checkout HEAD <file>
git clean
Entfernen untracked Fichiers von working Répertoire
git clean
git clean -n
Vorschau Fichiers zu sein Supprimé
git clean -n
Remote Operations3
BefehlVerwendung
git remote hinzufügen origin <URL>
Manage remote repositories
git remote hinzufügen origin <URL>
git push origin [branch-name]
Push zu remote repository
git push origin [branch-name]
git pull origin [branch-name]
Pull updates von remote repository
git pull origin [branch-name]
Git Konfiguration7
BefehlVerwendung
git config --list
List alle Git Konfiguration
git config --list
git config --global user.name <name>
Set user name für commits
git config --global user.name <name>
git config --global user.email <email>
Set user email für commits
git config --global user.email <email>
git config --global alias.<alias> <command>
Erstellen global alias für Git commands
git config --global alias.<alias> <command>
git config --system core.editor <editor>
Set Standard editor für alle users
git config --system core.editor <editor>
git config --global --edit
Open global config file in editor
git config --global --edit
git config --global color.ui auto
Aktivieren colored Ausgabe für Git commands
git config --global color.ui auto
Other Commands2
BefehlVerwendung
git var -l
List Git environment variables
git var -l
git help <command>
Anzeigen Aide für specified command
git help <command>
Related Terms
Unter sind common Git terms das wird Aide Sie better understand die Git version control system.
Git:Git: An Öffnen-source, distributed Version control system
Commit:Commit: A Git object das represents ein snapshot von die entire repository als ein SHA
Branch:Branch: ein lightweight, movable pointer to ein commit
Clone:Clone: Erstellung ein local Kopieren von ein remote repository
Remote:Remote: ein repository hosted on GitHub, GitLab, etc., where alle team members can Absenden modifications
Fork:Fork: Creating a Kopieren of another Utilisateur's repository
Pull Request:Pull Request (PR): A request für others zu pull und merge Ihr changes zu ein repository
HEAD:HEAD: Represents die current working Répertoire, kann switched using git checkout

❓War ist Git Commands Reference

Git command reference and cheat sheet providing quick access to common Git commands, workflows, and best practices für version control.

✨Funktionen

🚀

Comprehensive Git commands reference mit syntax examples

Complete Git commands reference mit syntax examples, usage instructions, and practical scenarios covering Alle aspects of version control.
⚡

Categorized commands für easy navigation and learning

Commands organized by Catégorie einschließlich basic operations, branch management, remote operations, undo operations, tagging, et configuration für easy navigation.
🎯

Kopieren-to-clipboard functionality für quick command usage

One-klicken kopieren-zu-Zwischenablage functionality für any Git command, enabling you zu quickly einfügen und execute commands in Ihre terminal.
🔒

Suchen functionality zu find specific commands quickly

Real-Heure Suchen functionality zu quickly find specific Git commands durch Name, Beschreibung, oder usage, improving Ihr workflow efficiency.

🎯Anwendungsfälle

Entwicklungs-Workflow

Nutzen Sie die Git-Befehlsreferenz während der Implementierung, um technische Inhalte zu erzeugen, zu prüfen, zu formatieren oder zu verifizieren, ohne zu umfangreicheren Projektwerkzeugen wechseln zu müssen.

Code-Review und Bereinigung

Die Git-Befehlsreferenz hilft dabei, kopierte Ausschnitte, erzeugte Dateien, Konfigurationsfragmente und Implementierungsdetails vor dem Commit oder Teilen zu prüfen.

Technische Dokumentation

Machen Sie aus praktischen Beispielen der Git-Befehlsreferenz verständlichere Pull Requests, Betriebsanleitungen, Onboarding-Hinweise sowie API- oder SDK-Dokumentationen.

📚Praxisleitfaden

War ist Git Version Control

Git ist ein distributed version control system das tracks changes in source code während software development. Es ermöglicht plusieurs developers zu Travail auf die same Projet simultaneously, maintains ein vollständig Historique von changes, und ermöglicht branching und merging workflows. Git verwendet ein three-tree architecture (Working Répertoire, Staging Area, Repository) und stores data als snapshots eher als Fichier differences.

Git Command Structure und Syntax

Git commands follow a consistent structure: 'git <command> [options] [arguments]'. The system includes over 100 commands organized into Catégories like basic operations, branching, merging, remote operations, and advanced Funktionen. Each command has specific syntax rules, Optional parameters, and usage patterns. Advanced Funktionen include command aliases, Benutzerdefiniert commands, and integration mit external tools.

Command Suchen und Reference Systems

Git command reference tools verwenden sophisticated Suchen Algorithmen zu bereitstellen schnell access zu command information, Syntax, und examples. The system includes voll-text Suchen, Catégorie filtering, command completion, und intelligent suggestions. Erweitert Funktionen include fuzzy matching, command Historique, und integration mit development environments. The implementation ensures schnell Suchen performance, genau Ergebnisse, und

Developer Workflow und Learning Applications

Git command reference tools sind wesentlich für developer Éducation, workflow Optimierung, und productivity enhancement. Applications include learning Git fundamentals, command Syntax reference, workflow automation, und team collaboration. The tools unterstützen divers Compétence Niveaux, bereitstellen interactive learning Expériences, und integrate mit development environments. Erweitert Funktionen include command execution, workflow templates, und integration mit

💬Frequently Asked Questions

❓What is Git command reference?
Git command reference is a comprehensive tool cette provides quick lookup, descriptions, et usage examples pour Alle common Git commands. It helps developers quickly find et understand how to use Git commands.
💬How do I Suchen pour a specific Git command?
You can use le Suchen box at le top of le Page to Eingeben command names, descriptions, or usage keywords. le tool will Filtern et display matching commands in real-Heure.
🔍How do I Kopieren a Git command?
There is a Kopieren icon on the right side of each command line. Klicken it to Kopieren the command to votre clipboard. You can also Klicken the Kopieren Schaltfläche in the command Tabelle.
💡How are commands categorized?
Commands are categorized by function, including basic operations, commit Historique, branches et Tags, Entfernen commands, merge et rebase, undo commands, remote operations, Git configuration, et other commands.
📚Does ce tool include Alle Git commands?
ce tool includes le most commonly used Git commands et common options. Git has over 100 commands, et ce tool focuses on le most frequently used commands in daily development.
🎯How can I learn to use these Git commands?
You can browse commands in each Catégorie et view descriptions et usage examples pour each command. It is recommended to Starten avec basic operations et gradually learn advanced Funktionen like branch management et merge operations.
✨Do command descriptions include all options?
Each command includes the most commonly used usage and options. pour Mehr detailed option descriptions, it is recommended to check the official Git Documentation or use the git Aide <command> command.
🌟Can I use ce tool offline?
Ja, this tool runs completely in the browser and does not require an internet connection to view and Kopieren Git commands. However, an internet connection is Erforderlich to load resources on Erste use.

💡How To & Tips

1️⃣

Git-Befehle durchsuchen oder suchen

Durchsuchen Sie kategorisierte Git-Befehle oder verwenden Sie die Suchfunktion, um schnell die benötigten Befehle zu finden.
2️⃣

Befehlsbeschreibungen und Verwendung anzeigen

Klicken Sie auf einen Befehl, um detaillierte Beschreibungen und Verwendungsbeispiele anzuzeigen und zu erfahren, wie Sie den Befehl richtig verwenden.
3️⃣

Befehle in die Zwischenablage kopieren

Klicken Sie auf die Schaltfläche Kopieren, um den Befehl in Ihre Zwischenablage zu kopieren, um ihn im Terminal zu verwenden.
4️⃣

Befehle im Terminal ausführen

Fügen Sie den kopierten Befehl in Ihr Terminal ein und führen Sie ihn aus, um Ihre Git-Operationen abzuschließen.

User Comments

0 / 2000
Loading...