You're free to collect some git commands from the Web, sort it out.
1. Common git commands
Command |
Brief Description |
Special Notes |
git add |
Add to Staging Area |
|
Git add–interactive |
Interactive add |
|
git apply |
Apply Patches |
|
git am |
Apply Message Format Patches |
|
Git annotate |
Comment File line submission information |
Equivalent to Git blame |
Git archive |
File Archive Packaging |
|
Git bisect |
Two-point Search |
|
Git blame |
FILE-by-line traceability |
|
Git branch |
Branch Management |
|
Git cat-file |
Repository Object Research Tools |
|
Git checkout |
Check out to a workspace, switch, or create a branch |
|
Git Cherry-pick |
Submit picking |
|
Git citool |
Graphical commit, equivalent to git GUI commands |
|
Git clean |
Clear the workspace does not track files |
|
git clone |
Cloning a version library |
|
Git commit |
Submit |
|
git config |
Querying and modifying configurations |
|
git describe |
Visually display submission IDs through milestones |
|
Git diff |
Difference comparison |
|
Git difftool |
Call the graphical diff comparison tool |
|
git fetch |
Get the remote repository submission |
|
Git format-patch |
Create a patch file in message format. See git AM command |
|
git grep |
File Content Search Locator Tool |
|
Git GUI |
Graphical tools based on TCL/TK, focusing on submissions and more |
|
Git help |
Help |
|
Git init |
Version Library initialization |
|
Git init-db* |
|
Synonyms, equivalent to git init |
git log |
Show Submission Log |
|
git merge |
Branch Merge |
|
Git mergetool |
Graphical conflict resolution |
|
Git MV |
Renaming |
|
Git pull |
Pull back the commit of the remote repository |
|
git push |
Push to remote repository |
|
Git rebase |
Branching variable Base |
|
Git reflog |
Branch and other reference change records management |
|
Git remote |
Remote repository Management |
|
Git repo-config* |
|
Equivalent to git config |
git reset |
Reset Change Branch "cursor" to point to |
|
Git rev-parse |
Convert various reference representations to hashes, etc. |
|
git revert |
Reverse Commit |
|
git rm |
deleting files |
|
Git show |
Display various types of objects |
|
It stage* |
Equivalent to git add |
|
Git stash |
Save and restore Progress |
|
git status |
Show workspace file Status |
|
git tag |
Milestone Management |
|
2. Object library operation related commands
Command |
Brief Description |
Special Notes |
Git commit-tree |
Create a submission from a tree object |
|
Git hash-object |
Computes a hash value or creates an object from a standard input or file |
|
Git ls-files |
Show workspaces and staging area files |
|
Git ls-tree |
Displays the files that the tree object contains |
|
Git Mktag |
Read standard input to create a milestone object |
|
Git mktree |
Read standard input to create a tree object |
|
Git read-tree |
Read tree object to staging area |
|
Git update-index |
Work area content registration to staging area and staging area management |
|
Git unpack-file |
Create temporary file containing the contents of the specified blob |
|
Git write-tree |
Create a tree object from staging area |
|
3. Reference operation related commands
Command |
Brief Description |
Special Notes |
Git Check-ref-format |
Check if reference names conform to specifications |
|
Git for-each-ref |
Reference iterators for Shell programming |
|
Git ls-remote |
To display a reference to a remote repository |
|
Git Name-rev |
Display the commit ID as a friendly name |
|
Git peek-remote* |
|
Obsolete please use Git ls-remote |
Git rev-list |
Show version Range |
|
Git show-branch |
displaying branch lists and topological relationships |
|
Git show-ref |
Show local references |
|
Git symbolic-ref |
Display or set symbol references |
|
Git update-ref |
Update references to point to |
|
Git Verify-tag |
Check the tag of GPG signature |
|
4. Repository Management Related commands
Command |
Brief Description |
Special Notes |
Git count-objects |
Shows the number of loose objects and disk usage |
|
Git filter-branch |
Version Library refactoring |
|
Git fsck |
Object Library Integrity Check |
|
Git fsck-objects* |
|
Equivalent to Git fsck |
Git GC |
Repository Storage Optimization |
|
Git index-pack |
Create a corresponding index file from a packaged file |
|
Git lost-found* |
|
Obsolete, please use Git fsck–lost-found |
Git pack-objects |
Read the object ID from the standard input, package it into a file |
|
Git pack-redundant |
To find extra pack files |
|
Git pack-refs |
To package a reference in a. git/packed-refs file |
|
Git prune |
Delete an expired object from the object library |
|
It prune-packed |
Remove loose objects that have already been packaged |
|
Git relink |
To establish a hard connection for the same objects in the local repository |
|
Git repack |
Packaging loose objects that are not packaged in a repository |
|
Git show-index |
Reads the index file of the package, displaying the contents of the packaged file |
|
Git unpack-objects |
Release files from packaged files |
|
Git verify-pack |
Verifying Object Library Packaging files |
|
Data transfer Related commands
Command |
Brief Description |
Special Notes |
Git fetch-pack |
Execute this command locally when executing a git fetch or git pull command to get the missing object from another repository |
|
Git receive-pack |
Commands that are executed remotely when executing a git push command to accept push data |
|
Git send-pack |
Commands executed locally when executing a git push command to push data to another repository |
|
Git upload-archive execute git archive–remote command when you create an archive based on a remote repository, the remote repository executes this command to deliver the archive |
|
|
Git upload-pack |
Execute this command remotely when executing a git fetch or git pull command, packaging and uploading objects |
|
6. Mail-related commands
Command |
Brief Description |
Special Notes |
Git imap-send |
Send a patch over IMAP |
|
Git mailinfo |
Submit instructions and patches from mail export |
|
Git mailsplit |
Extract messages from an MBOX or Maildir format mailbox to a file individually |
|
Git request-pull |
Create information that contains the differences between commits and the address of the pull operation |
|
Git send-email |
Send mail |
|
7. Protocol-related commands
Command |
Brief Description |
Special Notes |
Git daemon |
Implementing the GIT Protocol |
|
Git http-backend |
CGI program to implement HTTP protocol, Support Intelligent HTTP protocol |
|
Git instaweb |
Instant launch Browser browsing the current repository via Gitweb |
|
git shell |
Restricted shell that provides SSH access to execute only git commands |
|
Git update-server-info |
Auxiliary files required for new dumb protocol |
|
Git http-fetch |
Get repository via HTTP protocol |
|
Git Http-push |
Push via HTTP/DAV protocol |
|
Git remote-ext |
Called by the GIT command to provide extended protocol support through external commands |
|
Git remote-fd |
Called by the git command, using the file descriptor as the Protocol interface |
|
Git remote-ftp |
Called by the GIT command to provide support for the FTP protocol |
|
Git Remote-ftps |
Called by the GIT command to provide support for the FTPS protocol |
|
Git remote-http |
Called by the GIT command to provide support for the HTTP protocol |
|
Git Remote-https |
Called by the GIT command to provide support for the HTTPS protocol |
|
Git remote-testgit |
Protocol Extension Sample Script |
|
8. Repository conversion and interaction-related commands
command |
brief description |
Special Comments |
git archimport |
import arch repository to git |
|
git bundle |
submit packaging and unpacking to pass between different repositories |
|
git cv***portcommit |
|
|
git cvsimport |
import CV S version library to git. or use Cvs2git |
|
git cvsserver |
git CVS protocol emulator for CVS commands to access git Repository |
|
git fast-export |
submit export to Git-fast-import format |
|
git fast-import |
other repositories migrate to git common tools |
|
git svn |
git as the front-end operation Subversion |
|
Share reprint Please specify address: http://blog.csdn.net/w19981220
9. Merging related auxiliary commands
Command |
Brief Description |
Special Notes |
Git merge-base |
For other scripts to invoke, find two or more commits to the nearest common ancestor |
|
Git merge-file |
Three-to-one file merge for two different versions of a file |
|
Git merge-index |
Invoke the specified conflict resolution tool on the conflicting file in index |
|
Git Merge-octopus |
Merge more than two branches. See Octopus Merge strategy for git merge |
|
Git merge-one-file |
Standard helper programs called by Git Merge-index |
|
Git merge-ours |
Merge with local version and discard others version. See ours merge strategy for git merge |
|
Git merge-recursive |
A three-to-one merge for two branches. See recursive merge strategy for git merge |
|
Git merge-resolve |
A three-to-one merge for two branches. See resolve merge strategy for git merge |
|
Git merge-subtree |
Sub-tree merging. See subtree Merge strategy for git merge |
|
Git merge-tree |
Explicit three-way merge results without changing the staging area |
|
Git fmt-merge-msg |
A script call to perform a merge operation to create a merge commit description |
|
Git rerere |
Reusing a documented conflict resolution |
|
10. Miscellaneous
Command |
Brief Description |
Special Notes |
Git bisect–helper |
Called by the git bisect command to confirm the binary search progress |
|
Git check-attr |
Shows whether a file has a property set |
|
Git checkout-index |
Copy files from staging area to workspace |
|
Git cherry |
Find commits that are not merged into the upstream |
|
Git diff-files |
Compare staging areas and workspaces, which is equivalent to Git diff–raw |
|
Git diff-index |
Compare staging area and repository, equivalent to Git diff–cached–raw |
|
Git diff-tree |
Compare two tree objects, equivalent to Git diff–raw a B |
|
Git difftool–helper |
Called by the git difftool command, the default diff tool to use |
|
Git Get-tar-commit-id |
Extract the Commit ID from the TAR package created by Git archive |
|
Git gui–askpass |
Command git GUI to get user password input interface |
|
Git notes |
Submit Comment Management |
|
Git Patch-id |
Patch Filter line number and white space character to generate patch unique ID |
|
Git quiltimport |
Apply the quilt patch list to the current branch |
|
git replace |
Submit Replacement |
|
Git shortlog |
Summary output of git log, suitable for product release notes |
|
Git stripspace |
Delete empty rows for other scripts to invoke |
|
Git submodule |
Sub-module Management |
|
Git tar-tree |
|
Obsolete, please use git archive |
git var |
Show Git Environment variables |
|
Git web–browse |
Launch a browser to view a directory or file |
|
Git whatchanged |
Show the commit history and each commit change |
|
Git-mergetool–lib |
Included in other scripts to provide selection and execution of the merge/diff comparison tool |
|
Git-parse-remote |
Included in other scripts, providing functions to manipulate the remote repository |
|
Git-sh-setup |
Included in other scripts, provides Shell programming library of functions |
|
Copyright Notice: Step by step, easy to review, the shot when the shot, there are errors, must correct, thank you, and common progress!
Git common command set quick check table