
The SSH key is stored on my desktop, and the SSH key is attached to my GitHub account. This SSH key is used to connect and to authenticate to my GitHub repository without using a username or password.
Git powershell windows 10#
Next we need to configure Git on my Windows 10 computer with an SSH key. While is it possible to configure your own git server, I created an account at GitHub so I can publish scripts for others on the Internet to access. Once the git client is installed, you’ll need somewhere to save your work. For example, this is what my PATH variable looked like before and after installing the Git client: If this directory is missing, the Posh-Git module will generate an error (I demonstrate this later in the post). This option will add a directory to your PATH variable in Windows, which the Post-Git module will need. One option that I believe you will need to select during the installation is “Use Git from the Windows Command Prompt”. I’m not going to go through a screen-by-screen how-to of its installation, but I usually accept the defaults and don’t have any issues (yet).
Git powershell software#
Git is version control software used to check out files, make branches, and merge those changes back to a central repository. The first component that needs to be installed and configured is the Git client. I’m not going to pretend that I fully understand everything I did or if this is the best way to do it. Also, if you are more experienced in this area and see something I should (or should not) be doing, please leave a comment below. This blog post is an effort to document this, primarily for myself, but you are welcome to use.
Git powershell how to#
I had a vague screenshot of how to set up the repository once everything was configured, but nothing of installing the necessary software or generating an SSH key. It had been awhile since I used Git and Posh-Git, so I recently undertook the process of setting this environment, and, as usual, I struggled. My goal moving forward is to keep more of my public scripts on GitHub for others to consume as well as having a central repository so I could access them from multiple systems. Coming from a more system administrator background, usually scripts are kept on your local drive or, if you’re lucky, a file share where others can access them. In an effort to be “more official”, I’ve decided I needed to work more with Git and source control. Let’s take a look at an example from a real repository.I’m not a developer, but I do enjoy programming and writing scripts. If you want to generate graphs like that for your Git repository, you can use Show-GitGraph to do so. This one shows 2 branches and several commits. This looks a lot like the diagrams that you see in git help guides. Each branch just points to a specific commit. Every commit has one or more parent commits.

Git makes a great example for PSGraph because it is already a directional graph. I spent today working on it and I would like to share my progress. One of the commands that I find myself running all the time from this module is Show-GitGraph. So I have started compiling them into a new module called PSGraphPlus. Some of them have turned out to be quite useful. Things like network connections and process relationships. One thing I do in my demos is use local system information to generate graphs. I have been presenting my PSGraph module to a few Powershell user groups.
