commands.sh
⌘K

git add

all

Adds changed files to the index.

More info →

Options (5)

-A, --allboolean

Add all files (tracked and untracked)

Example: git add {{[-A|--all]}}
-u, --updateboolean

Only add already tracked files

Example: git add {{[-u|--update]}}
-f, --forceboolean

Also add ignored files

Example: git add {{[-f|--force]}}
-p, --patchboolean

Interactively stage parts of files

Example: git add {{[-p|--patch]}}
-i, --interactiveboolean

Interactively stage a file

Example: git add {{[-i|--interactive]}}

Examples (8)

Add a file to the index

git add path/to/file

Add all files (tracked and untracked)

git add [-A|--all]

Add all files recursively starting from the current folder

git add .

Only add already tracked files

git add [-u|--update]

Also add ignored files

git add [-f|--force]

Interactively stage parts of files

git add [-p|--patch]

Interactively stage parts of a given file

git add [-p|--patch] path/to/file

Interactively stage a file

git add [-i|--interactive]
made by @shridhargupta | data from tldr-pages