A Crash Course in Version Control and Git
These are the presentation materials and notes used at the PowerShell.org TechSession A Crash Course in Version Control and Git.
At the end of the day, this is quite similar to PowerShell. You're not going to pick up Git and GitHub from an hour long webinar or a three day course. Start using Git and GitHub for a project. Get involved with a repository on GitHub.
The only way you'll pick this up is if you start using it on a regular basis... And if you're not on some fancy development team (or even if you are), this is going to be far simpler than picking up PowerShell.
Resources from the PowerPoint:
Here are some handy resources from the last slide, and a few extracted from the slide notes. Don’t be intimidated, you don’t need all this, but it may come in handy if you want to dive a bit deeper into the weeds.
Why Use Version Control?
Research your own scenario. Chances are you should be using version control. A few examples:
- The Operations Report Card - Because Tom said so.
- A stackoverflow thread
- Why Use a Version Control System?
- Why revision control?
- A Visual Guide to Version Control
These are a great way to spin up quickly. The GitHub guide is short and sweet.
- GitHub’s interactive guide - Learn Git in 15 minutes
- Learn Git Branching
- Interactive Cheat sheet
- Official Git reference
- Pro Git (free!) - the first two or three chapters are a great intro
- Understanding Branches
- Git Explained: For Beginners
- GitHub Flow – GitHub from a Browser
- GitHub for PowerShell Projects - Shameless plug
Contributing to Microsoft’s DSC Resources on GitHub
- Pro Git (free!) - the rest of the book : )
- A Visual Git Reference
- Git From the Inside Out
- Git For Computer Scientists - Great read with helpful pictures, don’t be intimidated by the title
- Branching, forking, other concepts explained
- Git Power Routines Bite sized, practical videos on more advanced git activities (background).
- Linus Torvalds' Google Tech Talk on Git - More focused on design, but a fun talk
Oh shoot, something went wrong!
A few recent articles:
- Git Disciplined
- Git for IT Professionals: Getting Started - Thanks to Ravikanth! More to come in this series
Popular Git clients on Windows
- GitHub for Windows - I use this; it's simple, and it works.
- Atlassian SourceTree - I use this; Supports Mercurial, more functionality than GitHub for Windows, if you need it.
- msysgit - Command line and a basic GUI
- TortoiseGit - I don't use this, but I've heard good things.
- Yada yada yada
Continuous Integration and Delivery
This is an interesting topic, excited to see this mature in the MSFT / PowerShell ecosystem. You should start exploring this, it's incredibly helpful.
- Automating with Jenkins and PowerShell on Windows
- PowerShell + Pester + Jenkins : Journey to Continuous Integration
- Fun with GitHub, Pester, and AppVeyor
- GitHub, Pester, and AppVeyor: Part Two
- Testing DSC Configurations with Pester and AppVeyor
- Sergei Vorobev from the PowerShell team, talking GitHub, Pester, and AppVeyor
- PowerShell.org Community Build Server - Thanks to Dave Wyatt, PowerShell.org, Chef, and anyone else behind this!
- The vast majority of the youtube video should be reasonable, content wise.
- Paraphrased / simplified a few things.
- The description of 'HEAD' was a bit shaky, not sure why I tried to reword that on the spot - sorry about that! You probably won't even need this, but here's an explanation of HEAD.
- Contributing to the Microsoft DSC resources? You can ignore most of the branch and HEAD discussion. Long story short, just make sure you are working on the dev branch, and that you submit your pull request to the dev branch.
- I mentioned there weren't many solid Git server solutions in the Microsoft ecosystem. Haven't used it, but SCM-Manager might be worth a peak if you want a free on-prem solution, and you don't mind Java.
Thanks to Nick Getchell and PowerShell.org for the invite, it was an honor and a pleasure to give this presentation!