6.3 KiB
title |
---|
Overview |
The git
command-line tool supports various subcommands such as git clone
, git checkout
, and so forth. The sparo
command-line is intended to be a complete replacement for git
.
Sparo has four kinds of subcommands:
-
Mirrored subcommands such as
sparo branch
andsparo revert
directly invoke the correspondinggit
version of that subcommand. The motivation for using mirrored subcommands is to enable Sparo to provide advice about parameters that may cause performance issues. Additionally, you can optionally configure Sparo to collect anonymized usage metrics to help you measure the experience in your repository. (Collected data is sent to your own service. It is not accessible by any other party.) -
Enhanced subcommands follow the same basic design as their
git
counterparts, but with adaptations for sparse checkout profiles and more efficient defaults. There are four enhanced commands:sparo checkout
sparo clone
sparo fetch
sparo pull
(not implemented yet; currently mirrorsgit pull
)
-
Renamed subcommands are the mirrored versions of the four enhanced subcommands. They are renamed to add a
git-
prefix:
sparo git-checkout
sparo git-clone
sparo git-fetch
sparo git-pull
(not implemented yet)
- Auxiliary subcommands are new subcommands that provide Sparo-specific functionality. They are:
sparo auto-config
sparo init-profile
sparo list-profiles
sparo inspect
(not implemented yet, will report working directory status and diagnostics)sparo reclone
(not implemented yet, will efficiently revert to a clean clone)
Mirrored commands
Each subcommand has its own page in this documentation, except for the mirrored commands which are already covered by the Git documentation. For convenience, the most essential "porcelain" subcommands are listed in the table below, however every Git subcommand is supported.
Subcommand | Summary |
---|---|
git add | Add file contents to the index |
git am | Apply a series of patches from a mailbox |
git archive | Create an archive of files from a named tree |
git bisect | Use binary search to find the commit that introduced a bug |
git branch | List, create, or delete branches |
git bundle | Move objects and refs by archive |
git checkout | Switch branches or restore working tree files |
git cherry-pick | Apply the changes introduced by some existing commits |
git citool | Graphical alternative to git-commit |
git clean | Remove untracked files from the working tree |
git clone | Clone a repository into a new directory |
git commit | Record changes to the repository |
git describe | Give an object a human readable name based on an available ref |
git diff | Show changes between commits, commit and working tree, etc |
git fetch | Download objects and refs from another repository |
git format-patch | Prepare patches for e-mail submission |
git gc | Cleanup unnecessary files and optimize the local repository |
git gitk | The Git repository browser |
git grep | Print lines matching a pattern |
git gui | A portable graphical interface to Git |
git init | Create an empty Git repository or reinitialize an existing one |
git log | Show commit logs |
git maintenance | Run tasks to optimize Git repository data |
git merge | Join two or more development histories together |
git mv | Move or rename a file, a directory, or a symlink |
git notes | Add or inspect object notes |
git pull | Fetch from and integrate with another repository or a local branch |
git push | Update remote refs along with associated objects |
git range-diff | Compare two commit ranges (e.g. two versions of a branch) |
git rebase | Reapply commits on top of another base tip |
git reset | Reset current HEAD to the specified state |
git restore | Restore working tree files |
git revert | Revert some existing commits |
git rm | Remove files from the working tree and from the index |
git shortlog | Summarize 'git log' output |
git show | Show various types of objects |
git sparse-checkout | Reduce your working tree to a subset of tracked files |
git stash | Stash the changes in a dirty working directory away |
git status | Show the working tree status |
git submodule | Initialize, update or inspect submodules |
git switch | Switch branches |
git tag | Create, list, delete or verify a tag object signed with GPG |
git worktree | Manage multiple working trees |
. . . | ...and many other subcommands including any custom commands found in the shell PATH |