![]() ![]() So for me I just use the Downloads folder in my Windows profile. Navigating in the Git Bash terminal is just like using the command line or Linux/Apple bash terminal. To do that open the Git Bash terminal, and then move to a directory where you want to download a copy of your code from Github and work on it. Once you have a repository on Github you want to work with then we need to go grab a copy of it from Github using Git. I find it easiest to start by creating my repository on Github and then going to grab it from there with Git. Now, once you have Git configured to work with Visual Studio Code taking things to the next level and connecting it with Github is pretty easy. For a nominal fee you can create private repositories. A free account let’s store your repositories publicly, so anyone can see what you’re working on. So, Github is a great place to store your code, as well as share your code. Just look for the Source Control icon in Visual Studio Code. Once you open a folder in Visual Studio Code you can start tracking changes to your code that you store within that folder. Now you’re ready to start working with Git. Then, set your email address: git config -global user.email you want to configure your name and email to be something else just for the working directory you’re in then just omit the –global from the commands about. To set your name global use the command: git config -global user.name John Doe Now, you can set your information globally or per local repository. Once Git is installed open the Git bash window and we’ll get started. This could be your name and actual email address, or maybe some pseudo name and email address you using for coding. Configuring Gitīefore you can even start using Git there is some really basic config you need to do, which is set your name and email address. Once you get the branch to a level of confidence you can then merge it to the master and delete that branch. This allows you to maintain your master code which you know works. With Git if you have your code to a working “production” level you can maintain it, but still develop it by adding what Git referrers to as “branches.” So, if you have a bug you need to fix or a feature you want to add you can create a new branch to address a specific scenario. Before I knew it I had a bunch of different files with various levels of complexity, features, and functions. As I was developing a PowerCLI script once I got a version working I would create a new version for the next feature I wanted to add to my code. ![]() It’s a way to track changes to your code as you develop it. Git is an SCM, which is Software Configuration Management. Honestly, I had little clue as to what Git was even just a few weeks before writing this article. So, one thing I really like about Visual Studio Code is it’s native support for Git. So, first things first – if you don’t already have them installed go get Visual Studio Code and Git, install them both and come back… Also, get yourself a Github account if you don’t already have one. In this post I’ll go through the detailed steps of configuring Visual Studio Code to work with Git and Github to keep track of your code. For me the default color scheme is easy on the eyes when I’m working, the contextual highlights bring my attention to something when it’s not correct, and it integrates with Github out of the box as well, although some assembly is required. ![]() I’m using to develop/learn PowerShell, Power CLI, and Python. I’ve fast become a big fan of Visual Studio Code for my ISE (Integrated Software Environment). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |