Azure DevOps Repos with GIT and Visual Studio for Developers - Read description for updated course

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi welcome to the asha devops repos with git and Visual Studio for developers course in this course you're going to learn a ton of stuff you're going to create a project in Visual Studio push it to Asha DevOps repos create branches learn about commits synchronization branch policies merge conflict and so much more I hope you'll enjoy this course so let's get started so what is Asha DevOps for any software project we need three things every software project needs a project management tool so what exactly is a project management tool a project management tool is where you gather the requirements break it up into various tasks assign it to people and make sure that they are doing the task so every software project needs a project management tool every software project needs a source control tool so what exactly source control source control is when multiple developers need to work on the same code they will put the code in one central server and the developers will create the code and push that code to that central server so here you can see that there will be like a central server a code repository and the developers working in that local computers will create the code and will push the code to the central server the central server will maintain a history of all the changes so every software project needs a source control tool every software project needs a built-in deployment tool so what exactly is a build and deployment tool creating a software project is like putting together a puzzle every developer creates one piece of the puzzle so the build and deployment tool what it will do is it will take all the changes by these developers make sure that they all work well with each other and then once it works it will build them together and deploy it to the server and which in turn will serve the software to the end users so every software project needs a project management tool a source control tool and a build and deployment tool as a DevOps is like a tree in one tool by Microsoft so what exactly is TFS and VSDs TFS are team foundation server by Microsoft used to be the tool which did all these three things project management source control and build and deployment but it was an on-premise installation that means you need to install the software in your company and then you manage the particular software as cloud became more famous the cloud version of TFS used to be called VSDs or Visual Studio Team Services and then later on Microsoft changed the name of VSDs to Azure Devils so Asha de Vaux is this three-in-one tool it does project management where gathers the requirement breaks up into tasks and assign it to people and monitors the progress the source control where multiple developers can work on the same code and build and deployment tool where all the changes are combined together and made sure that their work will with each other and deployed to the server in Azure DevOps the project management tool is called as abodes the source control tool is called as repos and the build and deployment tool is called the azure pipelines or CI CD which stands for continuous integration and continuous delivery in this class we are going to learn about as repos the source control part of it there is already a course on project management called ash abodes and I have it published at Patrick videos comm as well as on udemy on udemy if you search for Asha devops project management you will get the Asha BOTS class where you will learn about project management let us get fit in with us what does get now previously source control used to be in this one central repository either the cloud or your on-premise server so all the developers will create the code and save the code in the central repository this central server will maintain a history of who made what changes over a period of time people felt like we wish we had our own local version control like having version control in the central server is fine but we wish we had our own local version control so local version control is what you call get soaked it maintains a history of changes locally as well as we will use these Asha devops to maintain a history of who made what changes remotely in the cloud so get this local version control tool so let's get started first to use git let us go and install git go to google and search forget and go to this get downloads download the Windows version do you want to install it say yes now before installing it make sure that Visual Studio is closed and once we show Studios closed click on next and keep clicking next you don't have to select anything keep all the defaults keep clicking next and then click on install now once you have installed it we now need an azure DevOps account so to create an azure DevOps account if your company already has an Asha develops account you can use it or if you are trying to learn as a DevOps let us go create an Outlook account and using an Outlook account let us create a free Asha DevOps account to create an Outlook account just go to Outlook calm and then create an account once you have your Outlook account let's search for asha DevOps and let's go to the azure dev appserver over here you can either sign in if you already have an account with asha DevOps you can sign in or you can have a free trial click continue now that you have logged into Azure DevOps click on the upper left hand side corner called Asha DevOps and you will notice that you can create a project now this project is nothing but a project space your company may already give you the space or we can create one right here I'm just going to call it training space here I'm going to select private that means only people whom I invite can come and work on this particular space if I make it public like for example I want to collaborate with people over the Internet then I can make it public but in our case most of the time it's going to be private the version control is going to be good and work item process is going to be scrum once you have this click on create project there is an error we can go back home but it has created the training space if you want to create another space you can always go to Azure DevOps click on create new project and create a new project now if you go to this training space over here you will notice on the left hand side the things we talked about Asha boards is the place where you create your requirements your user stories and you break it up into various tasks and assign it to people I have covered this in the Asha DevOps project management course if you go to udemy and search for Asha devops project management you will see my course right here so here you have repos reposes what we are going to learn in this particular course this is our source control and pipelines is our CI Siddhi process so we are going to learn about repos so let's click on Asha DevOps training space so this is our URL copy this particular URL because we are going to connect to this URL in our visual studio the local computers are going to connect to this particular training space or as a DevOps training space our local computer is going to connect with the azure DevOps training space located here now let us open up visual studio and let us create a project in Visual Studio I'm going to click on file new project you can create any project I'm going to select asp.net code web application the reason is it will come with certain files that we can play around with click Next I'm going to call it Patrick videos project and I'm going to click on create here I'm going to select the web application and click on create so we now have a project in our local computer so you can see that in our local computer we have created a project called Patrick videos project in Visual Studio the solution Explorer is the window to our local project if you want to see the files in our local project you have to look at the solution Explorer window just like we have a solution Explorer we have another window called team Explorer you can click on View team Explorer and team Explorer is the window to our cloud or the TFS server in our case it's going to be the cloud as a devops cloud now to connect our team Explorer to the azure dev ops cloud click on this button over here manage connections click on manage connections and click on connect to a project if you are not able to see these things click on the drop down box over here and click on project and my teams and click on manage connections and click on connect to a project you should be able to click on connect to a project and come to a screen like this if you have signed in using some other ID and you want to remove that particular ID you can come here to the upper right hand side corner account settings remove the previous ID close this and once again click on manage connections and you can sign in with your new ID where you have the free Asha dev ops account sign in so once you have connected to the project you will notice your space available over here click on your space you don't have to click on the project click on the space it by default created a project for you but that's not required and now click on connect if you have clone over here click on the drop down and select connect if you select this it will tell you to clone but we don't have to clone we just need to connect to this particular training space just make sure that you connect to this training space now let's click on connect once you clicked on connect this team Explorer is connected to the azure DevOps space let's go back to solution Explorer and right-click on the solution do not right-click on the project we want to put our entire solution in the cloud so right click on the solution and click on add solution to source control once you do that you're going to see something called as an up arrow and number two now click on this up arrow and number two right below at the bottom right hand side of your screen click on this up arrow number two and over here click on publish git repo now make sure that your user ID is over here your organization that is the free account that we had it's right here click on advanced and here select the project called training space that we created so if you are connecting to your organization they would give you all this information which URL and which project you need to connector so once again make sure your email address is correct your organization URL is correct and the project name is correct click on publish repository so here it will show that Patrick videos project was pushed to that particular space so what we did is we took this Patrick videos project and we pushed it to the Microsoft cloud so what we did is we took this particular local project and pushed it to the Microsoft cloud so how can you verify you can go over here and click on see it on the web if you click on this it will directly take you to that particular project repos files so whatever files you had this is your project so you can see in Visual Studio solution Explorer you can see the controller models we use the program the startup all these files are now on the cloud if you are not able to see it click on repos click on the drop down box your project should be right here Patrick videos project should be right here now if for any reason this does not work that means you are behind a firewall if you are behind a firewall you have to set up the proxy server so look at the troubleshooting section where I have shown you how to configure get for your proxy server once you have setup the proxy server and get this should work fine now if you're working in a corporate environment and you're behind a proxy server this wouldn't have worked so how do you troubleshoot now go open up and get bash you can go search for get bash and over here type in these following commands you don't have to change the directory and just type in wherever it points to so type in git config this - - global space user dot name and put in your name your first name and last name and then git config - - global space user dot email and put in the email address and press Enter so once you create this see where exactly this git bash file is pointing to here in my case it is pointing to see users battery in your case it may point to whatever your default location is wherever it was installed in your case it may be pointing to some other directory but go to this directory over here so in my case it was C users battery and you will notice that a dot git config file would have been created open this with notepad and you will see something like this I'm going to bring this to the left and save so this would be your name and this would be your company email address and if you are behind a proxy server you need to make some other entry over here too so here you can see that if you have a proxy server below your name and email you also need to make an entry for HTTP the SSL version make sure you keep the same syntax is equal to TL sv 1.0 or if you have another version of your TLS fee you can specify that and for the proxy you enter whatever your proxy server URL over here if you don't know your proxy server URL ask your corporate admin or you can go to your internet explorer and in the settings you should be able to find out what your proxy URL s in our case we don't need this I'm going to delete it so you will use this only if you are connecting to Asha devops using your corporate proxy server if you are behind a firewall so I'm going to remove this and save this so once your proxy is set up you can try and add the solution and try to push it again and it should work fine now that we have our project in the cloud the first thing we need to do is we have to make sure that we give access to this project to our team members so to do that in repose go to your project and in the drop-down click on manage repositories and in here click on security click on members and here you can specify who are the members of your team for example you can say that some of them will be like contributors I can add the members right here who are contributors and some of them may be like project admins or build admins so I can go over here and add them as project admins or build admins so let's add someone as a contributor you can either directly add their names over here or you can create teams you can go to teams create a team add people to this particular team like I'm going to say so here I have added another email address to the Steam and I can come to security and I can specify that the people in the team are contributors and this person alone is the project admin and like this I can go in to permission to this particular training space so these functions are applicable to all the projects in the training space now that we have given permission next let us look at branches by default it will create a master branch for you you can take a look at the branch over here in branches or in visual studio you can click on branches if you are not able to see this menu always go to team Explorer click on the home button and click on branches and in team Explorer you can see that it has a master branch both locally as well as in remote so master branches are created by default remember we should never work on the master branch you should always create another branch and work on it so according to gate whenever you are going to work on a user story or a feature you should create a branch you can create as many branches as you want you don't have to worry about space constraint imagine you have one gigabyte of code and if you create a branch it doesn't mean that there will now be like 2 gigabytes of code no version controlling software are so intelligent that when you create a branch it will only store the differences in those branches so if you have 1 gigabyte of code if you create a branch it will only be like 1 gigabyte and like say a few kilobytes so do not be afraid of creating multiple branches branches do not take up a lot of space so now let's go create a branch for something that we are going to work on you can either create a branch here locally and then push it to the remote or you can create a branch remotely and then pull it to the local we will see both ways first let us go create a branch locally and then push it to the remote so to create a local branch like for example we are going to work on some user story I want to create a branch right click on the master branch this is the local master right click on the local master and click on new local branch from and here let us give a name for the branch I'm going to call this let's call this branch use an underscore story underscore 0 1 let's keep the check mark here at the check out branch and click on create branch so now you can see that a new branch called user story or 1 has been created and it has been checked out so if you go work on the solution Explorer right now we will be working on the local branch called user story over now let's look at the diagrammatic representation of what just happened so here you can see that when we first created the project it created a master branch in the local computer so it created a master branch in our local gate and it also created a master branch in the cloud it created a master branch in the cloud so this is the cloud master branch which has the code you can click on the master so this is the cloud master branch if you want to see the code in the cloud master branch go click on the master and you will see the code over here this is the master branch code that we have then we right clicked on the master and created a new branch we said write new local branch from in the master and we checked it out and that creates a branch in the local computer in our local kit so here you can see that we have created a new branch and this branch is going to be like user story or one so we have now created a branch from the local master called user story or one now if you want other people to work on the same branch then what you need to do is you need to push this branch to the remote you need to push this branch to the remote if you do not intend to share this branch with other people if you feel like you're the only person who is going to work on this branch then you don't have to worry about pushing it to the remote you can work on this branch you can go here this has already been checked out and the way you know that this has been checked out is you can see that this branch is bold if you want to go back to the master branch you can double click on the master branch so whichever this board that means that particular branch has been checked out that means when you make some changes that code is going to be changed in that branch you should never change the code in the master branch always work on the local branch now imagine other people also want to work on this particular user story or one branch then to push it to the remote right click on your branch and click on push branch when you click on push branch it would successfully push the branch to the remote and you can see that over here it's available in Ramon origin you can also go and verify it by clicking on branches here in your cloud so you can see that the user story or one branch is available in the cloud too it's available in the cloud and other people if they want to work on this branch they can work on this branch how will they download this branch we will see that later
Info
Channel: Patrick WashingtonDC
Views: 37,814
Rating: 4.8906608 out of 5
Keywords: Azure Repos, GIT, Azure DevOps, Azure DevOps Repos, Azure GIT, Visual Studio GIT
Id: BGmQXs01o8I
Channel Id: undefined
Length: 23min 49sec (1429 seconds)
Published: Fri Sep 13 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.