How to add & commit your changes and files into Git

How to add & commit your changes and files into Git

1. In this post we will see how to commit & add your files and folder into git.

2. whenever you are create a new file or folder you have to inform to the GIT, then only your files and folder will be covered by VCS.

Example:

3.1 In my case using following command am checking how many branches is available now

git branch

3.2 Now am in standing in first_branch, here i created some files & modified some existing files. This files are ready to move to GIT.

3.3 Whenever you are create a new file or folder,  use git add command to add your changes to GIT. If you want to add file level  than use 

git add <FILE PATH> 

In case if you need to add all the files to Git then use 

git add *

3.4. Commit changes to head 

git commit -m <“YOUR COMMIT MESSAGE”> 

Commit all files which you have added with git add, and also commit any files you have changed since 

git commit -a

3.5 Once you had done git add & commit then check is there any files is available to commit or not

git status

On branch first_branchnothing to commit, working directory clean

 

“Save Rain Water

Leave a Reply