A commit is a revision of a file (or set of files) that is created when you save a change. When you commit a file change on a GitHub Repository, it not only saves the current file, but it keeps a record of every change that has been made to the file previously, and who made the change. This allows you to revert at any time should you commit a file change that causes problems. The purpose of this guide is to show you how to make changes in a file on the dev branch, and commit those changes to the repository.
Commit a File Change to README.md
- Navigate to your GitHub Repository
- Select the Branch: master Button
- Select the dev branch
- Select your README.md file
- Select the pencil tool to edit the file
- Type some information about your project in the editor. GitHub README files support markdown for formatting
- Directly above the editor, select Preview changes to see how it will look
- Scroll down to the bottom of the page, and explain what you just changed with short, concise text. You can use the description box as well, but in this case it is not needed
- Select the dev option to commit directly to the dev branch
- Select Commit
Congratulations! You now know how to commit a file change to the dev branch. The project we modified in this guide can be found live on GitHub for further reference.