From the course: Working with LinkedIn Learning Exercise Files on GitHub

Commit local branch changes - GitHub Tutorial

From the course: Working with LinkedIn Learning Exercise Files on GitHub

Commit local branch changes

- Committing is how you make changes you've made in the project final. Now because you're following a course, we don't recommend that you commit to the original branches. But if you want to experiment, one way to do it is to create a separate branch and commit to that. To do this, I'm going to switch back to my original branch. O2O2-B. And I'm going to bring back the stash that I had saved earlier. Let's say that I wanted to save these changes to come back to them later. I want to make sure that this file is saved. And then I'm going to go back to the source control menu, and go to the branch sub menu. And I'm going to create a branch now. I'm going to call this one O2O2, and I'll say working. This will create a new branch with your changes, but it's not yet committed. You can tell, because you have a star right here on the menu. To commit this, I'm going to go to the commit menu, and select commit all. This will ask me if I want to stage all my changes and commit them directly, which is just what I want to do. I'm going to say yes, and I'll need to provide a message. That saves it, and brings the name of the branch to your own custom name. You can still pick the original branch, or any of the other branches, in the project to follow along with another video.

Contents