In this Blog, I am going to explain about “How to create a new branch in VS and how you can push that branch in visual studio to git. In my previous Blog, I have mentioned about Cloning the repository in visual studio. You can see that Blog as well.
Below are the steps needs to be followed in order to create New Branch and push that Branch to git .
1. Open the VS and Login with your credentials.
2. Go to Master branch(Assuming Clone Repo is already Done).Below is the SS for the same.
3. On the Right Bottom, Click on Upward Arrow next to Master Branch.Click on New Branch.
4. Give it a appropriate name to a Branch and make sure you create Branch based on “Master” only. I created test Branch . See the below SS.
5. As soon as Branch is created, you will see that Branch on the Right Bottom, which means you are currently working on this Branch.
6. Now, we need to push this Branch to git. There is Push Button in git Changes Section. See the below SS.
If you are not able to see the Git Changes Section, go to View Tab.
7. Now, Click on that Push Button , then it will ask some Permissions as this user (VS user) should have permissions to write to your git repo. Once you give required permissions, you will see below Screen appear on your Machine.
Now, Branch “Test” is present in git repo. See the below SS.