GIT Add

GIT add is used to add file to the staging area. Let's assume our webpro project has got 'readme.txt' file. Follow the following to add them to staging area.

Code Structure
<pre>git add readme.txt</pre>

Code Structure
<pre>git add '*.txt'</pre>
Note: It will add all '.txt' files

Code Structure to add all files
<pre>git add -A .</pre>
Note: . or dot stands for current directory so everything in and beneath is added.

What is Staging Area?
A place where we can group files together before we 'commit' them to Git.

Share this

Related Posts