GitHub Branch Edit Commit

Branches, Edits & Commits

This article is part of a series on Github Desktop. For the introductory piece you can visit here.

Now it’s time to get to work. But you don’t make your changes in the default branch; jobs should be broken up and done in separate side branches. So, click the arrow button to open the “branches” dropdown list.

GitHub Desktop switch branch

  1. Type in the name of a new branch. Make the name descriptive of the job you will be doing and try to keep to one branch for one job. In the early stages it’s a good idea to keep the scope of the jobs small. In this example we are adding an FAQ section to the readme file.
  2. Click on New branch when you have entered the name.

GitHub Desktop New Branch

You can also publish the branch to origin by clicking the Publish branch button.

GitHub Desktop Publish Branch

Make extra sure that your new branch is shown as Current branch in the top bar. Then go into your cloned files and start making your changes. You can commit the changes whenever you like. You might choose to work in stages and commit after each stage, or you might do the whole job in one go and commit at the end.

  1. When you come back to GitHub Desktop it will show you the list of files that have been changed, and give you an indication of all the changes (green background for additions, red background for removals).
  2. For each commit you should enter a short description about the work that has been done. This will help you if you need to roll back to a previous commit.
  3. Then hit the commit button.

GitHub Desktop edit and commit

This article has been provided by Alan Coggins and was originally published on SimplyComputing.work. The original post can be found here.

Avatar for Alan Coggins
About Alan Coggins

Alan builds and maintains websites. He thinks that computing is way too complicated for most people and enjoys finding simple and elegant ways to make things happen. His clients seem very appreciative of this approach.

Start the discussion at forums.classicpress.net