13
INTRODUCTION TO GIT USING WINDOWS & POWERSHELL Mark Embling http://www.markembling.info http://twitter.com/markembling My blog Me on Twitter

Introduction to Git Using Windows & PowerShell

  • Upload
    ann

  • View
    49

  • Download
    1

Embed Size (px)

DESCRIPTION

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 - PowerPoint PPT Presentation

Citation preview

Page 1: Introduction to  Git Using Windows & PowerShell

INTRODUCTION TO GITUSING WINDOWS & POWERSHELL

Mark Emblinghttp://www.markembling.info

http://twitter.com/markembling

My blog

Me on Twitter

Page 2: Introduction to  Git Using Windows & PowerShell

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

Page 3: Introduction to  Git Using Windows & PowerShell

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

Page 4: Introduction to  Git Using Windows & PowerShell

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’)

Page 5: Introduction to  Git Using Windows & PowerShell

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)

Page 6: Introduction to  Git Using Windows & PowerShell

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

Page 7: Introduction to  Git Using Windows & PowerShell

DEMO

Page 8: Introduction to  Git Using Windows & PowerShell

ENVIRONMENT

• MSysGit http://code.google.com/p/mysysgit/

– Git– OpenSSH– GitGUI/GitK

• PowerShell– and some scripts to enhance the experience

• Console http://sourceforge.net/projects/console/

• DiffMerge http://www.sourcegear.com/diffmerge/

• TortoiseGit http://code.google.com/p/tortoisegit/

Page 9: Introduction to  Git Using Windows & PowerShell

POWERSHELL + GIT

• Add custom aliases– git status → gs

• Tweak the prompt• Scripts to add more– SSH Agent

Page 10: Introduction to  Git Using Windows & PowerShell

DEMO

Page 11: Introduction to  Git Using Windows & PowerShell

OTHER COOL GIT STUFF

• GitHub http://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

• Gitorious http://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

Page 12: Introduction to  Git Using Windows & PowerShell

Try it out for yourself

Page 13: Introduction to  Git Using Windows & PowerShell

THAT’S ABOUT ALL

Questions?

Mark Emblinghttp://www.markembling.info

http://twitter.com/markembling

More Git & PowerShell stuff on my blog

Thanks for listening to my babbling