Published March 06, 2018 by

Git – Add and Delete Files

Using git add command we are adding new files to a local git repository.

Command Syntax

# git add file_name

Example

# git add index.html


Using git rm command we delete files from a local git repository.

Command Syntax

# git rm file_name

Example

# git rm index.html


Previous: Add Remote Repository                             Next: Commit Files and log