From the course: Visual Studio: Source Control with Git and GitHub

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Commit changes to another branch

Commit changes to another branch - Visual Studio Tutorial

From the course: Visual Studio: Source Control with Git and GitHub

Start my 1-month free trial

Commit changes to another branch

- [Instructor] When you add a new branch to your repository, there is no changes committed to it yet, so there's, basically, you have two pointed to the same part of the repo. So what I need to do is make a modification on this B3 branch, here. So, I'll go back to the colors file, add a new color in here. I already have green, so let's pick another one, how about yellow, and save that, and then I'll do a commit, and I am on my B3 branch, so commit all and push. That message didn't stay on-screen long enough, but it basically said that the branch hadn't been pushed yet and then, after a few seconds, it shows up here. Successfully pushed branch B3 to origin. Now, let's go look in manage branches, and let's check in remote. So, you see, I have the B3 branch here, local, and master, and B3 local, and our B3 on master on the remote, and let's go check what happens when I switch over to the master branch. Right here, check…

Contents