Contrary to Centralized Version Control Systems (DVCS), like Subversion, a commit is a local operation in Distributed VCSs, like Git. This means that everybody is allowed to commit (to his local repository).On the command line, use the following command to commit your changes and create a new commit:
Before committing, changes have to be staged, to be included in the next commit. You can use
git commit -a
as shorthand for
git add . git commit
git add -p git commit
This allows you to filter and review the changes for the commit.
To transfer your local commits to a remote repository use the push command.
To modify the last commit in your history, you can amend it.