-1

screenshot from TheOdinProject

please see the scrnsht i new to this new it says using git add .a is for adding all files in CURRENT DIRECTORY and git add -A is for adding all files in CURRENT REPOSITORY. Is directory different from repository or ONE AND THE SAME?Thanks.

asdsyd
  • 1
  • 1
  • 4
  • "Current Directory" is just the folder you're currently in. If you're at the root, then this would be the same as "Current Repository". If you `cd FOLDER`, then they would be different. – JBallin Jun 14 '21 at 02:50

1 Answers1

1

The REPOSITORY word is used to define the whole scope of your project. It's the folder where you can find the .git hidden folder, if you are using Git to the version control system.

Instead, a DIRECTORY is just a generic folder, that can be including a repository of some project.

In your example, using git add ., you will be adding all the files on the current folder, but if you use git add -A, you will be adding all the files from the whole project folder.

Hope to be useful :)