how What does git add . (git add single dot) command do? [duplicate]

 

Questions


This question already has an answer here:

I don’t get what the Git command when adding files to the stage with the use of a period (or full stop, single dot) means:

$ git add .

What does this do?

 

 

————————————————-

Answer

git add . adds / stages all of the files in the current directory. This is for convenience, and can still be used if you have certain files you don’t want to add by using a .gitignore

A tutorial for .gitignore is located here.

A deeper look into git add . vs git add -A vs. git add -u is located here and it might answer your question if you wanted more control of how you add all of the files / wanted to know how git add . works.

git,git-add

Facebook Comments

Post a comment