hasproductions.blogg.se

Visual studio code git tutorial
Visual studio code git tutorial













And the second line sets the upstream to be the master branch in the repo. What it will do is connect our local repository with the remote repository. By pasting this, it already ran the first line. Now I will paste the command that we copied. And now let's bring up our terminal by hitting the keys Control + `. Having done that, we can scoot on over back to Code. Now, as I mentioned, since we're working with an existing repository, that is, we already have content, we can choose this second option, "push an existing repository from the command line", and click this icon here to copy to the clipboard. Since we already have content we're working with, we don't need to initialize this repository. And we don't need to change anything else. All right, so now what I'll do is scoot on over to GitHub, and what I'm going to do is create a repository by selecting New Repository. So by clicking on this Git icon, we can add our comment that says: "Added readme2", and I can click this check to commit all, which is the same, as you could see, as Command + Enter. Now you'll notice that on the left-hand side it recognizes that there's been one change, which is that addition of that README file. I'll add a comment that says "Something important". So why don't we go ahead and actually create a change? So I'm going to create a read-me file there's already one here, so I'll create another one just called README2 just by clicking the Add File icon. It's taken into account all the different changes. Now you'll notice that the number 76 is not there anymore. So I'll go ahead and put in a comment that says init, and do Command + Enter. Once that's done, you'll see on the left-hand side here that there are 76 changes, and we are ready to commit that to stage. So we click on the Git icon, and then click this button that says Initialize Git Repository. To start working with Git, what we want to do is to initialize a Git repository. So I've gone into the terminal and I've navigated to my MyDotnet directory, which is where my Dotnet project is. Now that I'm done verifying that Git is installed correctly, I'm ready to go to my project. Gives me the version so I know the installation was a success. Now I will go to the terminal to check that the installation was successful by typing in git -version. I will go ahead and launch this to start the installation process.

visual studio code git tutorial

So let's go ahead and navigate to Git's website, and we'll go ahead and download for our operating system. So the first thing that we're going to want to do is install Git. There's a few providers that's available to use one is, obviously, GitHub another is Visual Studio Online yet another is Bitbucket. So it's a pretty good thing that Visual Studio Code could integrate nicely with Git. Source control is an important part of development.















Visual studio code git tutorial