Basic Snapshotting

git add .  (Add file contents to the index, here . represent current directory)

This command updates the index using the current content found in the working directory, to prepare the content staged for the next commit.

After making any changes to the working directory, and before running the commit command, you must use the add command to add any new or modified files to the index.

This command can be performed multiple times before a commit. It only adds the content of the specified file(s) at the time the add command is run; if you want subsequent changes included in the next commit, then you must run git add again to add the new content to the index.

The git add command will not add ignored files by default. If any ignored files were explicitly specified on the command line, git add will fail with a list of ignored files

Adds content from all *.txt files under Documentation directory and its subdirectories:

$ git add Documentation/\*.txt

Write a Reply or Comment

Your email address will not be published.