In Git when new content is added or modified, it needs to be committed as the latest version in the repository. To commit any changes open a terminal and from the command prompt enter the following command:
$cd HelloWorld $echo "Made some changes" >> index.html $git commit index.html -m "Made some changes"
The above commands will make a change to an existing file called index.html, and then commit the change with a log message.
If you have several changes and you commit all this changes, you can perform the following command:
$git add . $git commit -m "Made some changes"
The above command performs a batch add and commit with a single log message. These commands can be entered in single line by specifying an add -a swith along with the commit command:
$git commit -a -m "Made some changes"
When the content is committed and just right after the command was entered, it will show the number of files and insertions (changes).