maiograde.blogg.se

Git in visual studio code
Git in visual studio code







git in visual studio code git in visual studio code

Git always keeps track of your work, and if needed, you can revert to an old version if necessary. Jokes aside, now that your code is on GitHub, go and check this other video I’ve mentioned before to see how you can manage it directly from VSCode as well.There's no doubt that Git is one of the most popular version control systems out there. Last thing you can do is select what files or folders you want to include in your repo (the default is everything, so if that's what you want to do you can just skip this step).Īnd after that, VSCode will do its magic, create the repo for you in GitHub, set it as the origin on the local folder, and push the code.Ĭool right? And you know what would be even cooler? If you could hit the like buttons on the side :) When you click on Publish to GitHub, VSCode will ask you what name you want your new repo to have (defaults to the name of the root folder of your project) and you can choose whether you want your new repo to be private or public. This will do for you the repo initialization as well, but will also create a new repo in GitHub and push the code to it. If you want to have your repo in GitHub, instead, use Publish to GitHub. The first option does only execute the git init command, so it does technically create a repository for you but only on the local machine. Just click on the Git - Source Control iconĪnd this will prompt you to either Initialize Repository or Publish to GitHub Now that we know we are logged in, creating the repository in GitHub is very easy. If it is not like this, click on Sign In (GitHub) and you are good to go. Of course with your username, not mine 😇 The only thing you need to make sure to do before hand is logging in into VSCode with your GitHub user.

git in visual studio code

let's just continue :)Įverything you need to create a new repository in GitHub from VSCode is already present in Visual Studio Code itself. But what if you don’t? Let’s do it now.Īs usual, if you are a visual learner, or simply prefer to watch and listen instead of reading, here you have the video with the whole explanation and demo, which to be fair is much more complete than this post. That content assumed you already had your code on GitHub. I already have an article and a video talking about how to use VSCode with GitHub, but, as someone has pointed out: Do you have some code in VSCode and want to take it to GitHub, without having to write a single command in the CLI? Today I’m gonna show you how to do that, how to publish your code to a new GitHub repo, all from VSCode.









Git in visual studio code