git
Distributed version control system. Some subcommands such as `commit`, `add`, `branch`, `switch`, `push`, etc. have their own usage documentation.
More info →Subcommands (125)
Abort an ongoing rebase, merge, or cherry-pick. Part of `git-extras`.
Stage changed files for a commit.
Create shortcuts for Git commands. Part of `git-extras`.
Apply patch files and create a commit. Useful when receiving commits via email. See also: `git format-patch`.
Manage files with Git, without checking their contents in. When a file is annexed, its content is moved into a key-value store, and a symlink is made that points to the content.
Show commit hash and last author on each line of a file. See `git blame`, which is preferred over `git annotate`. `git annotate` is provided for those familiar with other version control systems.
Apply a patch to files and/or to the index without creating a commit. See also: `git am`.
Create an archive of files from a tree.
Generate a list of committers of a Git repository. Part of `git-extras`.
Use binary search to find the commit that introduced a bug. Git automatically jumps back and forth in the commit graph to progressively narrow down the faulty commit.
Show what commit and author last modified each line of a file.
Main Git command for working with branches.
View an upstream repository in the default browser. Part of `git-extras`.
Print a list of branches, sorted by last commit date. Part of `git-extras`.
A distributed bug tracker that uses Git's internal storage, so no files are added in your project. You may submit your problems to the same Git remote you use to interact with others, much like commits and branches.
Capture debug information from the system and user, generating a text file to aid in the reporting of a bug in Git.
Execute operations on multiple Git repositories. Part of `git-extras`.
Package objects and references into an archive.
Generate a changelog report from repository commits and tags. Part of `git-extras`.
Checkout a branch or paths to the working tree.
Find commits that have yet to be applied upstream.
Remove files not tracked by Git from the working tree.
Clear a Git working directory as if it was freshly cloned with the current branch including files in `.gitignore`. Part of `git-extras`.
A highly customizable changelog generator.
Clone an existing repository.
Add another author to the latest commit. Since this command rewrites the Git history, `--force` will be needed when pushing next time. Part of `git-extras`.
A powerful Git GUI with a slick and intuitive user interface.
Display data in columns.
Commit files to the repository.
Manage custom configuration options for Git repositories. These configurations can be local (for the current repository) or global (for the current user).
This command is an alias of `git abort`.
Display commits from an author. Part of `git-extras`.
Print the total number of commits. Part of `git-extras`.
Copy an existing file to a new location, preserving history. Part of `git-extras`.
Retrieve and store user credentials.
Export a single `Git` commit to a CVS checkout.
A really simple server for Git repositories.
List files that differ from another branch. Part of `git-extras`.
Give an object a human-readable name based on an available ref.
Show changes to tracked files.
Show file changes using external diff tools. Accepts the same options and arguments as `git diff`. See also: `git diff`.
Display how much activity a file has had, showing commits per file and "active days" i.e. total number of days that contributed to the file. Part of `git-extras`.
Git extension pack.
Pretty-print Git repository contributions.
Create or merge feature branches. Feature branches obey the format feature/name.
Download objects and refs from a remote repository.
A collection of Git extensions to provide high-level repository operations.
Fork a GitHub repo. Like `git clone` but forks first. Part of `git-extras`.
Verify the validity and connectivity of nodes in a Git repository index. Note: Does not make any modifications. See also: `git gc`.
Optimise the local repository by cleaning unnecessary files.
Merge commits from a branch into another branch and delete the source branch. Part of `git-extras`.
Find strings inside tracked files in a repository. Accepts a lot of the same flags as regular `grep`.
A GUI for Git to manage branches, commits, and remotes, and perform local merges. See also: `git-cola`, `gitk`.
Show total blame count for files with unstaged changes or calculate the change in blame between two revisions. Part of `git-extras`.
Display help information about Git.
Show/update `.gitignore` files. Part of `git-extras`. See also: `git ignore-io`.
Perform a merge or rebase between two Git branches incrementally. Conflicts between branches are tracked down to pairs of individual commits, to simplify conflict resolution.
Display Git repository information. Part of `git-extras`.
Initialize a new local Git repository.
Helper to launch a GitWeb server.
Work with large files in Git repositories.
Lock a file in a Git repository from being modified by a commit. Part of `git-extras`. See also: `git-unlock`.
List locked files in a Git repository. Part of `git-extras`.
Show a history of commits.
Automate add, commit, and push routines. Part of `git-extras`.
Extract patch and authorship information from a single email message.
Run tasks to optimize Git repository data.
Merge branches.
Run merge conflict resolution tools to resolve merge conflicts.
Show commits which aren't shared between two branches. Part of `git-extras`.
Build a tree object using `ls-tree` formatted text.
Check out GitLab merge requests locally. Part of `git-extras`.
Move or rename files and update the Git index.
Add or inspect object notes.
Delete files and erase their history from a Git repository. Part of `git-extras`.
Import from and submit to Perforce repositories.
Send commits to a pastebin site using `pastebinit`. Part of `git-extras`.
Check out GitHub pull requests locally. Part of `git-extras`.
Git command for pruning all unreachable objects from the object database. This command is often not used directly but as an internal command that is used by Git gc.
Rebase a branch on top of another using a merge commit and only one conflict handling. Part of `git-extras`.
Fetch branch from a remote repository and merge it to local repository.
Push commits to a remote repository.
Change details about an author identity. Since this command rewrites the Git history, `--force` will be needed when pushing next time. Part of `git-extras`.
Reapply commits from one branch on top of another branch. Commonly used to "move" an entire branch to another base, creating copies of the commits in the new location.
Show a log of changes to local references like HEAD, branches, or tags.
Create a Git tag for a release. Part of `git-extras`.
Manage set of tracked repositories ("remotes").
Pack unpacked objects in a Git repository.
Git REPL (read-evaluate-print-loop) - an interactive Git shell. Part of `git-extras`.
Create, list, and delete refs to replace objects.
Reuse fixes for merge conflicts.
Undo commits or unstage changes by resetting the current Git HEAD to the specified state. If a path is passed, it works as "unstage"; if a commit hash or branch is passed, it works as "uncommit".
Restore working tree files. Requires Git version 2.23+. See also: `git checkout`, `git reset`.
Create new commits which reverse the effect of earlier ones.
Remove files from repository index and local filesystem.
Print the root directory of the current Git repository. Part of `git-extras`.
Reverse `git scp` - copy files from the working directory of a remote repository to the current working tree. Part of `git-extras`.
Copy files from the current working tree to the working directory of a remote repository. Part of `git-extras`. Uses `rsync` to transfer files.
Stores private data inside a Git repository. Written in Bash.
Replace patterns in git-controlled files using sed. Part of `git-extras`.
Create a Git repository in a directory and commit all files. Part of `git-extras`.
Summarizes the `git log` output.
Show various types of Git objects (commits, tags, etc.).
Computes various Git repository size metrics and alerts you to any that might cause problems or inconvenience.
Squash multiple commits into a single commit. Part of `git-extras`.
This command is an alias of `git add`.
Stamp the last commit message, with the possibility to reference the issues numbers from your bug tracker or link to its review page. Part of `git-extras`.
See commits from a specified user. Part of `git-extras`.
Stash local Git changes in a temporary area.
Show the changes to files in a Git repository. List changed, added, and deleted files compared to the currently checked-out commit.
Read text (e.g. commit messages, notes, tags, and branch descriptions) from `stdin` and clean it into the manner used by Git.
Inspect, update, and manage submodules.
Merge subtrees together or split repository into subtrees.
Display information about a Git repository. Part of `git-extras`.
Bidirectional operation between a Subversion repository and Git.
Switch between Git branches. Requires Git version 2.23+. See also: `git checkout`.
Sync local branches with remote branches. Part of `git-extras`.
Create, list, delete, or verify tags. A tag is a static reference to a commit.
Create new files and add them to the index. Part of `git-extras`.
Undo recent commits. Part of `git-extras`.
Unlock a file in a Git repository so it can be modified by a commit. Part of `git-extras`. See also: `git lock`.
Change files modification time to their last commit date. Does not touch files that are in the working tree or index. Part of `git-extras`.
Print a Git logical variable's value. See `git config`, which is preferred over `git var`.
Show what has changed with recent commits or files. See also: `git log`.
Manage multiple working trees attached to the same repository.
Options (3)
-A, --allbooleanStage all changes for a commit
git add {{[-A|--all]}}-m, --messagebooleanCommit changes to version history
git commit {{[-m|--message]}} {{message_text}}-f, --forcebooleanReset everything the way it was in the latest commit
git reset --hard; git clean {{[-f|--force]}}Examples (8)
Create an empty Git repository
Clone a remote Git repository from the internet
git clone https://example.com/repo.gitView the status of the local repository
Stage all changes for a commit
git add [-A|--all]Commit changes to version history
git commit [-m|--message] message_textPush local commits to a remote repository
Pull any changes made to a remote