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

  1. Navigate to your GitHub Repository
  2. Select the Branch: master Button
  3. Select the dev branch
  4. Select your README.md file
  5. Select the pencil tool to edit the file
  6. Type some information about your project in the editor. GitHub README files support markdown for formatting
  7. Directly above the editor, select Preview changes to see how it will look
  8. 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
  9. Select the dev option to commit directly to the dev branch
  10. Select Commit
  11. .

 

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.

Leave a Reply