Common git commands

Source: Internet
Author: User
Tags diff imap unpack ftp protocol ssh access git commands git mergetool git shell

Common git commands brief description git add add to Staging area git add–interactive interactive add git apply app patch git am app mail format patch git annotate synonym, equivalent to git blamegit Archive file archive pack git bisect binary find git blame file line-up GIT branch branch management git cat-file Repository object research tools git checkout check out to workspace, toggle or create branch git Cherry-pick submit picking Git citool graphical commit, equivalent git gui command git clean cleanup workspace not tracking file git clone clone repository git commit commit git config query and modify config git Describe a milestone by visually showing the submission idgit diff difference compare git difftool call graphical diff diff tool git fetch get remote repository commit git format-patch create a mail format patch file. See git am command git grep file content search location tool git GUI based on TCL/TK graphical tools, focus on commit, etc. git help helps git init repository initialize git init-db* synonyms, equivalent to git initgit log display Cross-log git merge branch merge git mergetool graphical conflict resolution git mv rename git pull back to remote repository commit git push push to remote repository git rebase branch variable base git rebase– Interactive Interactive branch variable base git reflog branch and other reference change records management git remote repository management git repo-config* synonym, equivalent to git configgit reset Change branch "cursor" point to Git Rev-parse convert various reference representations to hashes such as git revert reverse commit git rm delete file git show display various types of objects git stage* synonyms, equivalent to git addgit stash save and restore progress git Status Display workspace file state git tag milestone management 2, object Library Operations Related command commands brief description git commit-tree from tree object Create commit git hash-object hash value from standard input or file or create object git Ls-files Display WorkZones and staging area files git ls-tree Display tree object contains files git mktag read standard input Create a milestone object git mktree read standard input Create a tree object git read-tree read tree object to staging area git Update-index Workspace content registration to staging area and staging area managing git unpack-file creating temporary files containing the contents of a specified blob git write-tree create a tree object from staging area 3, Reference Operations Related command commands brief description git Check-ref-format Check if reference name conforms to spec git for-each-ref reference iterator for Shell programming git ls-remote Show remote repository reference git Name-rev show commit ID as friendly name git peek-remote* obsolete commands, use Git ls-remotegit rev-list show version range git show-branch show branch list and topology relationship git show-ref show local reference git Symbolic-ref display or set symbol reference git update-ref update reference to git Verify-tag checksum GPG signature Tag 4, repository Management related Command command brief description git Count-objects shows the number of loose objects and disk consumption git filter-branch repository refactoring git fsck object library integrity check git fsck-objects* synonyms, equivalent to git fsckgit GC repository storage optimized Git Index-pack create a corresponding index file from a packaged file git lost-found* obsolete, use git fsck–lost-found command git pack-objects read object ID from standard input, package to file git Pack-redundant find extra pack files git pack-refs to package references into a. git/packed-refs file git prune remove outdated objects from the object library git prune-packed remove loose objects that have already been packaged git Relink make a hard connection to the same object in the local repository git repack package a loose object that is not packaged in the repository git show-index reads the index file of the package, displays the contents of the packaged file git unpack-objects free files from packaged files git Verify-pack Check Object library package file 5, data transfer Related Command command brief description gIt fetch-pack executes the git fetch or git pull command locally to get the missing object from other repositories git receive-pack commands that are executed remotely when executing the git push command to accept push data git send- A command that is executed locally when the pack executes a git push command to push data to other repositories 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 route the archive git Upload-pack execute a git fetch or git pull command when executing this command remotely, package objects, upload 6, mail-related command commands brief description git imap-send send a patch via IMAP git mailinfo from mail export submission instructions and patches G It mailsplit extract messages from an MBOX or Maildir format mailbox to a file 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 command commands brief description of Git Daemon implement git protocol git http-backend implement HTTP protocol CGI program, support Smart HTTP protocol git Instaweb instant launch browser via Gitweb Browse current repository git shell restricted shell, Provides SSH access to git-only commands git update-server-info Update dummy protocol required helper files git http-fetch get repository git via HTTP protocol http-push push git via HTTP/DAV protocol Remote-ext is called by the GIT Command and provides extended protocol support via external commands git remote-fd is called by a git command, using a file descriptor as a protocol interface git remote-ftp is called by a git command and provides support for the FTP protocol git Remote-ftps is called by the GIT command to provide support for the FTPS protocol git remote-http is called by the GIT command and provides support for the HTTP protocol git Remote-https is called by GIT commands and provides support for the HTTPS protocol git Remote-testgit Protocol Extension Example script 8, repository conversion and interactive command brief description git archimport import the Arch repository to the gitgit bundle to submit a packaged and unpacked package forTransfer between different repositories git cvsexportcommit a git commit as a CVS checkout git cvsimport import the CVS repository to git. Or use the CVS protocol emulator of the Cvs2gitgit cvsservergit for CVS commands to access git repository git fast-export commit to export to Git-fast-import format git Fast-import other repositories common tools for migrating to Git git svngit as a front-end operation Subversion 9, merging related auxiliary command commands briefly describes Git merge-base for other script calls, finds two or more commit recent common ancestor git Merge-file three-to-one file merge for two different versions of a file git Merge-index calls the conflict resolution tool specified for the conflicting file in index git Merge-octopus merges more than two branches. See git Merge's octopus merging strategy git merge-one-file a standard helper called by git merge-index git merge-ours merge with the local version and discard the others version. See ours merge strategy for git merge git merge-recursive for a three-to-two branch merge. See recursive merge strategy for git merge git merge-resolve for a three-to-two branch merge. See the git merge resolve merge strategy git merge-subtree subtree merge. See the git merge subtree merge strategy git merge-tree explicit three-way merge results, do not change staging area git fmt-merge-msg for the execution of the merge operation of the script call, to create a merge commit description git Rerere reuse logged conflict resolution 10, miscellaneous commands brief description git bisect–helper is called by git bisect command, confirm binary search progress git check-attr Show if a file has a property set to Git Checkout-index copy file from staging area to workspace git cherry find no merge upstream commit git Diff-files compare staging area and workspace, equivalent to git diff–rawgit diff-index compare staging area and repository, equivalent to git diff–cached–rawgit diff-tree compare two tree objects,Equivalent to git diff–raw A bgit difftool–helper called by the git difftool command, the default is to use the diff tool git Get-tar-commit-id extract commit I from the tar package created by Git archive DGit gui–askpass command git GUI get user password input interface git notes submit comment manage git Patch-id patch filter line number and white space character to generate patch unique Idgit Quiltimport Apply quilt Patch list to current branch git replace commit replace git shortlog to git log summary output, suitable for product release instructions git stripspace delete blank lines for other scripts to call Git Submodule sub-module management git tar-tree obsolete command, use Git archivegit var to display git environment variable git web–browse launch browser to view directory or file git Whatchanged shows the commit history and each commit change git-mergetool–lib included in other scripts, providing the choice and execution of the merge/diff tool Git-parse-remote included in other scripts, Provides functions for manipulating remote repositories Git-sh-setup included in other scripts, providing shell-programmed library of functions

  

Common git commands

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.