Skip to main content

University Library, University of Illinois at Urbana-Champaign

Introduction to GitHub: Making Commits

This guide introduces users to the GitHub Desktop application and provides an overview of basic GitHub functions and workflows. The guide is based on the Savvy Researcher workshop of the same name.

Making Commits

Making Commits

A commit is essentially a snapshot of your project or file in its current state, along with documentation that describes what changes were made between the current version of the file and earlier versions. Another way to think about commits is as ways in which you can differentiate versions of files in GitHub.

To make a commit, first you need to make some kind of change to the repository you are working on. When you make a change to a repository that GitHub is monitoring, it will detect this change and thereby present you with an opportunity to commit that change.

To practice making a commit, open a text editor (e.g. Notepad++ or TextEdit) and type a sentence or two. Then save the file in the folder that corresponds to your repository. Note that the change is detected by the GitHub application.

It's important to note the difference between saving your file and making a commit of those changes. At this point, your changes are saved, but not committed. To commit your changes, you will need to enter some text into the “Summary” field on the screen. This text should give a description of the types of changes you have made. When you are ready, click "Commit to master" to commit your changes. To send your commit to the GitHub cloud, click "Publish repository" in the upper portion of the screen.

To make sure you've got the hang of it, try making a few more commits following the steps outlined above. Each time you save changes to your file, GitHub should detect these changes, providing you with the opportunity to make a new commit.