O'Reilly logo

Pragmatic Version Control Using Git by Travis Swicegood

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Committing Changes

Committing is a relatively straightforward process that adds your changes to the history of your repository and assigns a commit name to them.

The change is not sent to a central repository, though. Other people can pull the change from you, or you can push the change to some other repository, but there’s no automatic updating. We’ll talk about these in Keeping Up-to-Date and Pushing Changes.

You can use git commit in multiple ways to commit changes to your repository, but every commit requires a log message. For simple messages, you can add a message by adding -m "your message". The message can be any valid string. You can also specify multiple paragraphs by passing multiple -m options to git commit.

For more complex ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required