TOOL ยป GIT

Add

Usage โ€‹

shell
git add OPTIONS PATH
OptionDescription
p --patchInteractively choose hunks of patch.

Patch โ€‹

While patching, send ? to see the help. Some often used options:

OptionDescription
yStage this hunk.
nDo not stage this hunk.
qQuit; do not stage this hunk or any of the remaining ones.
aStage this hunk and all later hunks in the file.
dDo not stage this hunk or any of the later hunks in the file.
sSplit the current hunk into smaller hunks.
eManually edit the current hunk.

Examples โ€‹

shell
git add .             # Add all
git add directory/    # Add all files inside a directory
git add path/to/file  # Add single file
git add -p file       # Add only part of the file (--patch)