

On the Windows 8.1 box, we’ll intentionally create a conflicting change in the Get-DotNetVersion.We’ll also modify the existing Get-DotNetVersion function (I gave you that source code in the previous article in this series).
Git powershell windows 10#
On the Windows 10 box, we’ll add a second function to our Get-Sysinfo This second function, named Test-Domain, performs a simple domain vs.

Now, we’re going to increase the complexity level of our development environment. We use push and pull operations to send and receive our committed changes, respectively. You know the old saying that “a picture is worth a thousand words.” To that point, I created the following illustration to help you get a handle on our development environment.Īs you can see in the previous illustration, three entities now have identical copies of the Get-Sysinfo project. In practice, you run clone just once to nab a remote repository, whereas you’ll run pull nearly every day, depending upon how active a developer you are.Īnyway, back to business.We’re pulling the GitHub repo into an empty directory, so we don’t have to worry about conflicts.Although we very well could have performed a clone just now, I elected for us to do a pull for two reasons: We run git clone when we want to copy some or all of a Git project to our local computer. Now, then-those of you with prior experience with Git probably wondered why we didn’t run git clone. git is a hidden folder that contains the Git tracking database. We’ll cover branching in a future lesson.Īs you can see in the following screenshot, we now have the Get-Sysinfo.ps1 script on our local computer. In the previous code, master refers to our GitHub project’s default branch, which is always named master. In this case, however, we aren’t worried about merging because our local folder is empty. The fetch copies the remote file(s) to our local repo, and the merge applies the remote’s changes to our local copies. We use git pull to perform a simultaneous fetch and merge operation. Okay, now it’s time for the “meat and potatoes” of the process.

You can have more than one remote repo with Git you’ll just need to specify another name for additional remotes or else you’ll get a name conflict error. That remote repo doesn’t have to reside in GitHub on a development team, you may add your colleague’s repos to your local instance as remotes as well. In the previous line of code, origin is simply the default name of the remote tracked repo. We use git remote add to point our local Git client to a remote repository. We’ll concern ourselves with annotation B in the next installment of this series where we discuss project forking. I called out this icon on the following screenshot as A. Navigate to the proper GitHub page and click the clipboard icon. To that point, we need the GitHub remote URL. We now need to add our GitHub repository as a remote. Here are the three commands in sequence: New-Item -Type Directory -Name Get-Sysinfo Next, I’ll set the stage for pulling down my Get-Sysinfo public GitHub project by creating a local project folder named Get-SysInfo, changing our command prompt into that folder, and finally enabling Git tracking. As we discussed in Part 1, I use git config to identify myself to Git with a username and an e-mail address.
Git powershell install#
I’ll first install Git for Windows and start a new, elevated PowerShell console session.
