git
Distributed version control system. Some subcommands such as `commit`, `add`, `branch`, `switch`, `push`, etc. have their own usage documentation.
More info →Subcommands (20)
Adds changed files to the index.
Main Git command for working with branches.
Checkout a branch or paths to the working tree.
Clone an existing repository.
Commit files to the repository.
Show changes to tracked files.
Download objects and refs from a remote repository.
Initialize a new local Git repository.
Show a history of commits.
Merge branches.
Fetch branch from a remote repository and merge it to local repository.
Push commits to a remote repository.
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.
Manage set of tracked repositories ("remotes").
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".
Create new commits which reverse the effect of earlier ones.
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.
Switch between Git branches. Requires Git version 2.23+. See also: `git checkout`.
Create, list, delete, or verify tags. A tag is a static reference to a commit.
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
git initClone a remote Git repository from the internet
git clone https://example.com/repo.gitView the status of the local repository
git statusStage 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
git pushPull any changes made to a remote
git pullReset everything the way it was in the latest commit
git reset --hard; git clean [-f|--force]