Skip to main content

Adds changed files to the index.

# To add a file to the index:
git add <path/to/file>

# To add all files (tracked and untracked):
git add -A

# To add all files in the current folder:
git add .

# To only add already tracked files:
git add -u

# To also add ignored files:
git add -f

# To interactively stage parts of files:
git add -p

# To interactively stage parts of a given file:
git add -p <path/to/file>

# To interactively stage a file:
git add -i