SlideShare a Scribd company logo
#comdaybe




        Git(Hub) for Windows Developers
                     Ordina Belgium
             Kristof Mattei & Bart Wullems
About us
• Bart Wullems
   – .NET Application Architect @Ordina
   – http://bartwullems.blogspot.com
   – bart.wullems@ordina.be
• Kristof Mattei
   – .NET developer @Ordina
   – http://kristofmattei.be
   – kristof.mattei@ordina.be
About Ordina
•   IT Consultancy Firm
•   Offices in Mechelen & Hasselt
•   600+ employees, 80+ MS developers
•   5 focus sectors:
    – banking, public, pharma, industry, teleco
      m
Agenda
•   Distributed Source Control
•   What’s Git?
•   Git Basics
•   MsysGit
•   Github
•   Github for Windows
•   Q&A
Distributed source control
About Version Control
 Local Version     Centralized
 Control Systems   Version Control
                   Systems
About Version Control
• Distributed Version
  Control Systems
  – No central repository
  – Disconnected
  – Fast
--distributed-even-if-your-workflow-isn’t

What’s Git?
Git
• Global Information Tracking
  – Git is a free and open source distributed version
    control system used as software configuration
    Management tool.
  – Git is a distributed version control system
  – Git does not use a centralized server.
  – Git runs on
    Linux, BSD, Solaris, Darwin, Windows, and
    other operating systems.
Git basics
Git Basics
The Three States
git and 3 conceptual spaces
• Git deals with 3 spaces. Each space is a self
  contained area of concern to git and to you.
   – Working Directory (e.g. 'testgit' folder)
       • this is where you keep your current files visible in directory or
         folder.
   – Index or Stage (e.g. "testgit/.git/index")
       • this is where git keeps snapshot to be committed
         permanently to Repository
   – Repository (e.g. "testgit/.git/objects/*")
       • This is the history of commits, trees, blobs etc..
Advantages
•   Free
•   Local
•   Fast
•   Distributed
•   Small
msysGit
msysGit
• Git client for Windows

  – http://msysgit.github.com/
LF and CRLF line endings
•   CRLF is for Windows and LF is for unix.
    – to keep cross platform development going
      smooth keep CRLF for windows and LF for
      unix
    – with autocrlf = true git converts your
      windows CRLF into LF internally
• Our recommendation
    – autocrlf = false
Open “Git Bash”
First git commands

demo
Coding

demo
Staging

demo
Commit

demo
Branch

demo
Merge

demo
Github
What is Github?
• https://github.com
GitHub

demo
Social coding

demo
Github for Windows
Github for Windows          New
• “Better Git on Windows”
Github for Windows

demo
Learn More
 The next step is to read guides and
 books online.

 start with the git community book
 http://book.git-scm.com
             marekj | testr.us
Learn More

• Git For Windows Developers by Jason
 Meridth

• http://think-like-a-git.net/
• http://gitref.org/
Q&A
Thank you!

More Related Content

Viewers also liked (7)

PPTX
Techorama - Evolvable Application Development with MongoDB
bwullems
 
PPTX
Javascript omg!
bwullems
 
PPTX
Tfs Monitor Windows Phone 7 App
bwullems
 
PPTX
Building an enterprise app in silverlight 4 and NHibernate
bwullems
 
PPTX
Convention over configuration in .Net 4.0
bwullems
 
PPTX
Caliburn.micro
bwullems
 
PPTX
Modyul2 angdaigdigsaklasikalattransisyunalnapanahon-140807210600-phpapp01
Dexter Reyes
 
Techorama - Evolvable Application Development with MongoDB
bwullems
 
Javascript omg!
bwullems
 
Tfs Monitor Windows Phone 7 App
bwullems
 
Building an enterprise app in silverlight 4 and NHibernate
bwullems
 
Convention over configuration in .Net 4.0
bwullems
 
Caliburn.micro
bwullems
 
Modyul2 angdaigdigsaklasikalattransisyunalnapanahon-140807210600-phpapp01
Dexter Reyes
 

Similar to Git(hub) for windows developers (20)

PDF
Git Tutorial
Ahmed Taha
 
PPTX
Git GitHub jsdbcghsvchjsbcmshg cv ddcsd cjhsbdcjhbdscbc gs cgsvcsbcdbdkjcbsdk...
saurabhpandeychp1
 
PPTX
Mini-training: Let’s Git It!
Betclic Everest Group Tech Team
 
PDF
Git Recipes 1st Edition Wodzimierz Gajda Auth
akakajeann21
 
PPTX
git Introduction.pptx
PrakharYadav58
 
PPTX
git and github-1.pptx
tnscharishma
 
PPTX
Git 101
jayrparro
 
PPTX
Git Series - Part 1
Mohamed Abdeen
 
PDF
Mini git tutorial
Cristian Lucchesi
 
PDF
Session: Git Basics & GitFlow Workflow
Midhun Mohanan
 
PPT
Introduction to git
Nguyen Van Hung
 
PPTX
Version Control with Git
Sahil Agarwal
 
PPTX
Git And Git Hub.pptx
MishalBibi
 
PDF
Professional Git 1st Edition Brent Laster
iqcsaufpc534
 
PPT
Introduction to Git
atishgoswami
 
PPTX
Git and github
Teodora Ahkozidou
 
PPTX
Getting Started with Git: A Primer for SVN and TFS Users
Noam Kfir
 
PPTX
Git and github fundamentals
RajKharvar
 
PPTX
Roslyn on GitHub
Immo Landwerth
 
Git Tutorial
Ahmed Taha
 
Git GitHub jsdbcghsvchjsbcmshg cv ddcsd cjhsbdcjhbdscbc gs cgsvcsbcdbdkjcbsdk...
saurabhpandeychp1
 
Mini-training: Let’s Git It!
Betclic Everest Group Tech Team
 
Git Recipes 1st Edition Wodzimierz Gajda Auth
akakajeann21
 
git Introduction.pptx
PrakharYadav58
 
git and github-1.pptx
tnscharishma
 
Git 101
jayrparro
 
Git Series - Part 1
Mohamed Abdeen
 
Mini git tutorial
Cristian Lucchesi
 
Session: Git Basics & GitFlow Workflow
Midhun Mohanan
 
Introduction to git
Nguyen Van Hung
 
Version Control with Git
Sahil Agarwal
 
Git And Git Hub.pptx
MishalBibi
 
Professional Git 1st Edition Brent Laster
iqcsaufpc534
 
Introduction to Git
atishgoswami
 
Git and github
Teodora Ahkozidou
 
Getting Started with Git: A Primer for SVN and TFS Users
Noam Kfir
 
Git and github fundamentals
RajKharvar
 
Roslyn on GitHub
Immo Landwerth
 
Ad

Recently uploaded (20)

PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
July Patch Tuesday
Ivanti
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
Advancing WebDriver BiDi support in WebKit
Igalia
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
July Patch Tuesday
Ivanti
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
Advancing WebDriver BiDi support in WebKit
Igalia
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
Biography of Daniel Podor.pdf
Daniel Podor
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Ad

Git(hub) for windows developers

  • 1. #comdaybe Git(Hub) for Windows Developers Ordina Belgium Kristof Mattei & Bart Wullems
  • 2. About us • Bart Wullems – .NET Application Architect @Ordina – http://bartwullems.blogspot.com – [email protected] • Kristof Mattei – .NET developer @Ordina – http://kristofmattei.be – [email protected]
  • 3. About Ordina • IT Consultancy Firm • Offices in Mechelen & Hasselt • 600+ employees, 80+ MS developers • 5 focus sectors: – banking, public, pharma, industry, teleco m
  • 4. Agenda • Distributed Source Control • What’s Git? • Git Basics • MsysGit • Github • Github for Windows • Q&A
  • 6. About Version Control Local Version Centralized Control Systems Version Control Systems
  • 7. About Version Control • Distributed Version Control Systems – No central repository – Disconnected – Fast
  • 9. Git • Global Information Tracking – Git is a free and open source distributed version control system used as software configuration Management tool. – Git is a distributed version control system – Git does not use a centralized server. – Git runs on Linux, BSD, Solaris, Darwin, Windows, and other operating systems.
  • 12. git and 3 conceptual spaces • Git deals with 3 spaces. Each space is a self contained area of concern to git and to you. – Working Directory (e.g. 'testgit' folder) • this is where you keep your current files visible in directory or folder. – Index or Stage (e.g. "testgit/.git/index") • this is where git keeps snapshot to be committed permanently to Repository – Repository (e.g. "testgit/.git/objects/*") • This is the history of commits, trees, blobs etc..
  • 13. Advantages • Free • Local • Fast • Distributed • Small
  • 15. msysGit • Git client for Windows – http://msysgit.github.com/
  • 16. LF and CRLF line endings • CRLF is for Windows and LF is for unix. – to keep cross platform development going smooth keep CRLF for windows and LF for unix – with autocrlf = true git converts your windows CRLF into LF internally • Our recommendation – autocrlf = false
  • 25. What is Github? • https://github.com
  • 29. Github for Windows New • “Better Git on Windows”
  • 31. Learn More The next step is to read guides and books online. start with the git community book http://book.git-scm.com marekj | testr.us
  • 32. Learn More • Git For Windows Developers by Jason Meridth • http://think-like-a-git.net/ • http://gitref.org/
  • 33. Q&A

Editor's Notes

  • #2: Bart (stelt ons allebei voor)
  • #5: BartBefore we start some questions:Who has experience with source control?Who has experience with distributed source control like Git or Mercurial?Who knows github?Who is using github today?Important remark: this is an introductionary session
  • #6: Bart
  • #10: Bart
  • #12: Kristof
  • #15: KristofJust describe the slide, straightforward.Important is not to fiddle with anything other than the Working Directory. All the rest are managed by Git.
  • #16: KristofFree, open source, fast.Full local copyBranching is first of all local, THEN you sync it with the server, so for all that matters the server doesn’t need to know that you’re developing changes on 3 seperate feature branchesOfcourse for backup related stuff it might (is) wise to sync them with at least one other server (if anything can go wrong, it will)Last point: since on the server the size is the same as your local repository, requirements are smaller. No need for a database server...
  • #17: BartThrough the console pain
  • #18: Bart
  • #19: BartTrue= handing voor cross platform teams(unix & windows & …)False= mag niet op WindowsInput= voorkeur indien iedereen op zelfde platformUpdate:True (only applies on Windows) crlf -> lf at checkin, lf -> crlf at checkout (NO!)False = leave as is ---- this is what we needInput: transform CRLF -> LF at checkin, don’t touch checkout.
  • #20: Bart
  • #21: BartIntroduce yourself to gitGitconfig and ~/.gitconfiggitconfig: global settings look at: C:\\Program Files (x86)/Git/etc/gitconfig notice the setting "autocrlf = true" ~/.gitconfig: user settings file tell git about yourself and your machine first and your preferences to create this file.Username : gitconfig --global user.name <name>Email : gitconfig --global user.email <email>Color UI  colors git output : gitconfig --global color.ui trueThese settingsget written to your ~/.gitconfig fileShow config file and content (~ = C:\\Users\\<username> folder)Better alternative then SSH key is the Windows Credential Store helper:Download it here https://help.github.com/articles/set-up-gitCreate SSH key(we need this to connect to GitHub later)$ cd ~/.ssh : Checks to see if there is a directory named ".ssh" in your user directory$ ssh-keygen -t rsa -C "[email protected]“ Creates a new ssh key using the provided email$ ssh -T [email protected] :Attempts to ssh to githubInitialize repositoryCreate a new folder)$ cd ~mkdir communityday2012cd communityday2012Git initA new git repository is createdShow the created foldersStart SeeGit
  • #22: Open Visual StudioCreate new applicationCopy the application content to the previously created folderAdd a readme.txt file to the created folderCheck the git status$ git status Too many files are includedAlso show result in SeeGitWe can solve this by adding a .gitignore filetouch .gitignoreGo to https://github.com/github/gitignore Select the correct .ignore file content and copy itCan also be configured for all projects : git config --global core.excludesfile ~/.global_ignore Check the git status$ git status Only the required files remainAlso show result in SeeGit
  • #23: To add one file, do:$ Git add Readme.txt (IMPORTANT: case sensitive!)To add all files, do:$ Git add . This will add all files to the staging environmentCheck the current status$ GitstatusAlso show result in SeeGit
  • #24: Let’s now commit the files to the repository$ git commit –m “Initial commit”Check the status$ git statusLet’s have a look at the commit history of your repository$ git logYou can view statistics about which files have changed and how many lines were added and removed from each file by adding the $ git log –stat (press q to quit the editor)Also show result in SeeGit
  • #25: KristofImportant remark: only one working folder(!)Git branch  view master branchGit checkout -b devGit branch  view dev branchesChange something in “dev” branch(readme)Commit in that branchGit checkout masterChange something in the same file(readme)  causes merge conflictCommit in the master branchAlso show result in SeeGit(If needed stash changes if you don’t want to commit them.)  similar to Shelvesets in TFS
  • #26: KristofSWITCH BRANCH to MASTER!!!!!  uses the same folder(!)Pull changes from devGit merge “dev”A merge is (unlike TFS) final  No local pending changes and commit(!)Use SeeGit to show resultsGitk  show history
  • #27: Kristof
  • #28: KristofJust read description, straightforward.
  • #29: KristofLogin as a userShow site functionalityAdd SSH keyClick “Account Settings” > Click “SSH Keys” > Click “Add SSH key”Create (new)repositoryPush local changes to githubgit remote add origin https://github.com/Snakiej/Empty.gitgit push –u origin masterShow some keyboard shortcuts(shift-?)Show reports(graphs)
  • #30: KristofForkLogin with other account( Bart)Fork repository from previous accountMake change to readmeAdd comment to lineSend pull requestPull requestsLogin with original accountReview pull request
  • #31: Bart
  • #32: Bart
  • #33: Adding repositoriesYou can add any repository already on your hard drive by dragging a folder in from Explorer. If that folder is a Git repository, GitHub for Windows will import all of the history and connect it to your GitHub accounts. Another great way to add repositories is to clone them from GitHub.com. You can do that right in the application by browsing through your personal account and any organizations you belong to. You can also clone with one click from any repository page on GitHub.com. Just look for the Clone in Windows button. Command lineYou can pull up a PowerShell console within the context of any repository. GitHub for Windows even includes the amazing posh-git utility for your command line pleasure. SSH key managementIn most cases you don’t even need SSH keys. All repositories are cloned over HTTPS by default, and GitHub for Windows caches your credentials so you don’t have to keep entering your password for every remote action, even on the command line. For cases where you have an existing repository using an SSH remote, GitHub for Windows will seamlessly set up SSH for you. You will get an email and see a new key added to your accountBranches: local & remoteCreate repositoryFrom file system through drag & dropFrom clone in windows button on GitHubChange repository settings- add gitignore- change gitattributesCreate branchChange branchCommit changeMerge branchShow diffPush to github button
  • #34: Bart
  • #35: Bart
  • #36: Bart