Using git commit will commit any staged files to both the local repository and the remote repository. code example
Example 1: git commit
git commit -a -m "The Commit message"
Example 2: how to commit changes in git command
git commit -a
git commit -a -m "The Commit message"
git commit -a