Options (5)
-A, --allbooleanAdd all files (tracked and untracked)
Example:
git add {{[-A|--all]}}-u, --updatebooleanOnly add already tracked files
Example:
git add {{[-u|--update]}}-f, --forcebooleanAdd an ignored file
Example:
git add {{[-f|--force]}} {{path/to/file}}-p, --patchbooleanInteractively stage parts of files
Example:
git add {{[-p|--patch]}}-i, --interactivebooleanInteractively stage a file
Example:
git add {{[-i|--interactive]}}Examples (8)
Stage a file for a commit
git add path/to/fileAdd 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]Add an ignored file
git add [-f|--force] path/to/fileInteractively stage parts of files
git add [-p|--patch]Interactively stage parts of a given file
git add [-p|--patch] path/to/fileInteractively stage a file
git add [-i|--interactive]made by @shridhargupta | data from tldr-pages