Friday 26 June 2015

How to change the branch in git


Open Visual Studio
Connect to team projects
Provide TFS Details and connect.
Under "Connect to team projects" you will see Local Git Repositories
You will see "Clone"
Click Clone
Now enter TFS Code path and local path to get the files from TFS
Click Clone
Now you will get all files to local

Now Under "Connect to team projects" you will see Local Git Repositories
You will see some name with tree structure icon.
Double click that, it will give all solutions under TFS.

Now click on Home icon
Click on Branches
You will see Actions
Expand Actions -->Click on Open Command Prompt
You will see one command prompt
Type below command to set one existing branch
git checkout MyBranch

Now click on Home icon
Click on "Unsynced Commits"
Click Sync
You will get all files from "MyBranch"