140 likes | 288 Views
Introduction to Git Using Windows & PowerShell. Mark Embling http:// www.markembling.info http:// twitter.com/markembling. My blog. Me on Twitter. Overview - Git. Distributed version control system Originally created for the Linux kernel project Runs on Linux/Unix, OS X & Windows
E N D
Introduction to GitUsing Windows & PowerShell Mark Embling http://www.markembling.infohttp://twitter.com/markembling My blog Me on Twitter
Overview - Git • Distributed version control system • Originally created for the Linux kernel project • Runs on Linux/Unix, OS X & Windows • Website: http://git-scm.com
Overview - PowerShell • Command shell environment • …and scripting language • Built on top of .NET • .NET object pipeline, not strings • Many built-in command aliases to make you feel at home • dir, ls→ Get-ChildItem
Why PowerShell? • Bash • Powerful, but somewhat out of place • Command.exe • Welcome to the past • PowerShell • Powerful • Customisable • Good for other tasks • (not single-purpose like ‘Git Bash’)
Git Concepts • Distributed version control • There is no central server (unlike SVN, CVS etc) • …although there can be if you like • All history, branches & tags stored locally on your machine • Commits, diffs and merges are fast • You can push and pull changes in your local repository to remote copies • Excellent for collaboration (open source)
Git Concepts • Proper branches & tags • Not just copies of the tree like Subversion • ‘trunk’ → ‘master’ • Branch per feature • Easy and cheap branching + fast merges • Trivial to create a branch, write a feature and merge back into master
Environment • MSysGithttp://code.google.com/p/mysysgit/ • Git • OpenSSH • GitGUI/GitK • PowerShell • and some scripts to enhance the experience • Console http://sourceforge.net/projects/console/ • DiffMergehttp://www.sourcegear.com/diffmerge/ • TortoiseGithttp://code.google.com/p/tortoisegit/
PowerShell + Git • Add custom aliases • git status→ gs • Tweak the prompt • Scripts to add more • SSH Agent
Other Cool Git Stuff • GitHubhttp://github.com/ • “Social coding” • Lots of open source projects there - popular • Forking (create your own copy of a project’s repository) • “Pull requests” – easy way to notify upstream repos of your wish to pull in your changes • Gitorioushttp://gitorious.org/ • Like GitHub • But open-source, so you can download and run your own • Gitosis • Easy way to run a git server • Linux/Unix & Windows (Cygwin) • Configured through its own special git repository which it hosts How recursive
That’s About All Questions? Thanks for listening to my babbling Mark Embling http://www.markembling.infohttp://twitter.com/markembling More Git & PowerShell stuff on my blog