Be a Git Ninja!

 Boston Code Camp 21
Yogiraj Aradhye

 About Me


Software Developer

Company: Clarus Marketing Group

Blog: aradhye.com

Twitter: @y09i

Email : 

yogi@aradhye.com



Special Thanks

Sponsors

You!

Steve Rovetti (@rovettidesign)

Dan Mangiarelli(https://www.linkedin.com/pub/dan-mangiarelli/16/b47/4a0)

Jeremy Beardsley(@jeremybeardsley)

Outline


Distributed Version Control System
Git
Git Setup on Windows
Git on Mac
Git on Mobile devices
Git with TFS
Useful commands
Development Workflows


What is DVCS?



[http://www.appfusions.com/display/StashSCMImporter/CVCS+vs.+DVCS+In+a+Nutshell]

Why DVCS?

Speed
Reliability
Flexibility
Easy Collaboration
Easy Reviews
Works well with continuous integration and continuous delivery tools
More on the topic

Atlassian  Blog  (BitBucket)
StackOverflow Link
SoftwareWhys


Git


Designed and Developed by Linus Torvalds in 2005

Git  is a British English slang roughly equivalent to "unpleasant person". 

Linus Torvalds said " I'm an egotistical bastard, and I name all my projects after myself. First 'Linux', now 'git'."

Linus Torvalds On Git



Why Git

  • Cheap local branching [1]
  • Git is Fast  [1]
  • Git is Small  [1]
  • The Staging Area  [1]
  • Distributed  [1]
  • Any Workflow  [1]
  • Easy to Learn  [1]
  • Git is the new standard [1]
  • Great community support  
  • Github and BitBucket OSS visibility
  • Windows Azure and Git [2] [3]
  • http://stackoverflow.com/tags/git/info

Citation

Set Up on Windows

  1. Get ConEmu/Cmder
  2. Get TortoiseGit for SSH purposes
  3. Get Putty
  4. Get Git
  5. Get PoshGit
  6. Get Git Extensions
  7. Use Cmder directly or use powershell

Detailed Instruction by Dan Mangiarelli
Powershell Scripts for Git by Dan Mangiarelli

Set up on Mac

GitHub help

Set SSH on Mac

More comprehensive post

P4Merge for 3 way merging

DiffMerge difftool

Git Extensions

Git(GitHub) on mobile devices







http://mobile.github.com/


But we use TFS


Git as source control in TFS


Jimmy Bogard's blog post


TL;DR Jimmy! Gimme goodness of Git on top of TFS







Useful commands

Clone
Stage
Commit
Git log
Git Alias
Branching
Tagging
Merging
Diff
Git stash
Rebase
Cherry-Pick

Merge Vs Rebase



[http://blog.sourcetreeapp.com/2012/08/21/merge-or-rebase/]
[https://blogs.atlassian.com/2013/10/git-team-workflows-merge-or-rebase/]

Workflows



Central

Gitflow

Forking

Pull requests

Central 




  
        [https://www.atlassian.com/git/workflows#!workflow-centralized]

Gitflow


[http://nvie.com/posts/a-successful-git-branching-model/]
[https://www.atlassian.com/git/workflows#!workflow-gitflow]

Forking



https://help.github.com/articles/fork-a-repo

Pull Requests




[http://scottchacon.com/2011/08/31/github-flow.html]
[https://www.atlassian.com/git/workflows#!pull-request]


You are now a certified Git Ninja!


  Questions? 

Twitter : @y09i
yogi@aradhye.com