commands.sh
⌘K

git

all

Distributed version control system. Some subcommands such as `commit`, `add`, `branch`, `switch`, `push`, etc. have their own usage documentation.

More info →

Subcommands (20)

Options (3)

-A, --allboolean

Stage all changes for a commit

Example: git add {{[-A|--all]}}
-m, --messageboolean

Commit changes to version history

Example: git commit {{[-m|--message]}} {{message_text}}
-f, --forceboolean

Reset everything the way it was in the latest commit

Example: git reset --hard; git clean {{[-f|--force]}}

Examples (8)

Create an empty Git repository

git init

Clone a remote Git repository from the internet

git clone https://example.com/repo.git

View the status of the local repository

git status

Stage all changes for a commit

git add [-A|--all]

Commit changes to version history

git commit [-m|--message] message_text

Push local commits to a remote repository

git push

Pull any changes made to a remote

git pull

Reset everything the way it was in the latest commit

git reset --hard; git clean [-f|--force]
made by @shridhargupta | data from tldr-pages