22
Git’in on Windows An introduction to git on the Microsoft platform

Git'in on Windows

Embed Size (px)

DESCRIPTION

This speech aims to provide the basics of git, integrating with GitHub and TFS on the Windows platform.

Citation preview

Page 1: Git'in on Windows

Git’in on WindowsAn introduction to git on the

Microsoft platform

Page 2: Git'in on Windows

About MeStacy Vicknair, MVP MCPDDevelopment Consultant for Sparkhound

Blog - http://www.wtfnext.comBRAG - http://www.braglunch.comTM - http://www.batonrougespeaks.com

Twitter: @svicknEmail: [email protected]

Page 3: Git'in on Windows

Agenda

• What is git?• Why (or why not) choose git?• Where do I git it?• git’in the basics• git’in against GitHub• git’in against TFS• Resources

Page 4: Git'in on Windows

What is git?

• Distributed Version Control System (DVCS)– Like TFS’s source control, but “distributed”

• Open Source under GNU LGPL v2.1• Freely available from http://git-scm.com

Page 5: Git'in on Windows

What is DVCS?

• No true “central repository”• Not a checkout, it’s a clone• Check in when you want• Push to central server when it’s stable

Page 6: Git'in on Windows

Who’s git’in it

• The Linux Kernel• Google for the Android OS• Ruby on Rails• PostgreSQL• Eclipse• Perl• Codeplex• … Git.

Page 7: Git'in on Windows

Why (or why not) choose git?

Pros• Free• Distributed (self replicating)• Lightweight• Secure via SSH / HTTPS• Changeset driven• Easy branching / merging• Disconnected check-ins

*based on Clearvision White Paper

Cons• Windows Second-Class• Barrier to entry• Different permissions

paradigm• It’s not ALM, just DVCS• Single repo management

– Google’s Repo

Page 8: Git'in on Windows

Where do I git it?(see what I did there)

githttp://git-scm.com/

msysgitGit for Windowshttp://code.google.com/p/msysgit/

posh-gitGit extensions for Powershellhttps://github.com/dahlbyk/posh-git

git-tfsAllows for TFS access via git https://github.com/git-tfs/git-tfs

GitExtensionsGUI / Explorer and VS integration for Windowshttp://code.google.com/p/msysgit/

gitflowGit extensions for high level branch process workflowhttps://github.com/nvie/gitflow

Page 9: Git'in on Windows

Git’in the BasicsOm nom nom knowledge

Page 10: Git'in on Windows

Git Basics: Staging

Image from http://progit.org

Page 11: Git'in on Windows

Git Basics: Ground level

git init – Create a repogit add – Stage files in the indexgit commit – Commit a filegit status – List current modificationsgit log – List of checkin history

Page 12: Git'in on Windows

Git Basics: Stash, Branch and Merge

git stash – Hold changes for later retrievalgit branch – Create, delete and list branchesgit checkout – Switch branchesgit rebase – Rebase branch from parentgit merge – Merge from child branch

Page 13: Git'in on Windows

Git Intermediates: Repo Administration

Images from http://whygitisbetterthanx.com

Page 14: Git'in on Windows

Git Intermediates: Repo Administration

Page 15: Git'in on Windows

Git Intermediates: Repo Administration

Page 16: Git'in on Windows

Git Intermediates: Repo Administration

Page 17: Git'in on Windows

Git’in against GitHubyeehaw

Page 18: Git'in on Windows

Git’in GitHub: Creating and Cloning

• GitHub requires SSH• git clone – Copy existing repository locally• git push - Push changes to a different repo• git remote – Create, list and delete connected

repos• git tag – Tags a version of the code

Page 19: Git'in on Windows

Git’in against TFSMoo.

Page 20: Git'in on Windows

Git’in TFS: clone, .gitignore, and checkintool

• .gitignore files help prevent unwanted checkins

• git tfs clone – Pull TFS repo with history• git tfs quickclone – No history• git tfs checkintool – TFS-esque checkin process• git tfs checkin – Git-esque quick checkin

Page 21: Git'in on Windows

Agenda

• What is git?• Why (or why not) choose git?• Where do I git it?• git’in the basics• git’in against GitHub• git’in against TFS• Resources

Page 22: Git'in on Windows

ResourcesTutorialshttp://progit.orghttp://book.git-scm.com/

Downloadshttp://git-scm.com/http://code.google.com/p/msysgit/https://github.com/dahlbyk/posh-githttps://github.com/git-tfs/git-tfshttp://code.google.com/p/msysgit/https://github.com/nvie/gitflow

Presentation Resourceshttp://stackoverflow.com/questions/4140133/how-does-tfss-shelveset-model-compare-to-a-dvcshttp://haacked.com/archive/2011/12/19/get-git-for-windows.aspxhttp://nathanj.github.com/gitguide/tour.htmlhttp://www.clearvision-cm.com/whitepapers/Clearvision%20-%20Git%20White%20Paper.pdfhttp://whygitisbetterthanx.com

[email protected]@svickn