git for folk who like guis
DESCRIPTION
Slides from a lightning talk at WordPress Melbourne User Group. The business end was a simple demonstration of SourceTree, no commandline :)TRANSCRIPT
![Page 1: Git for folk who like GUIs](https://reader034.vdocument.in/reader034/viewer/2022052619/5555a232b4c905a5178b53e8/html5/thumbnails/1.jpg)
Using GitAn intro for folk who like GUIs
![Page 2: Git for folk who like GUIs](https://reader034.vdocument.in/reader034/viewer/2022052619/5555a232b4c905a5178b53e8/html5/thumbnails/2.jpg)
What is Git?
• Git is a flavour of Source Control Management(aka revision control, version control)
• It is an open source command line tool with many GUIs available
• Created by Linus Torvalds to maintain the Linux kernal
![Page 3: Git for folk who like GUIs](https://reader034.vdocument.in/reader034/viewer/2022052619/5555a232b4c905a5178b53e8/html5/thumbnails/3.jpg)
Why use Version Control?
• Rollback to working version
• Extra redundant backups
• Keep dependencies updated
• Move towards collaborative coding
• Social proof: an extra point of presence(also StackExchange, StudioPress forums)
![Page 4: Git for folk who like GUIs](https://reader034.vdocument.in/reader034/viewer/2022052619/5555a232b4c905a5178b53e8/html5/thumbnails/4.jpg)
Setting Up
• Create a repo from scratch or by cloning
• Stage files / hunks
• Commit to the repo
![Page 5: Git for folk who like GUIs](https://reader034.vdocument.in/reader034/viewer/2022052619/5555a232b4c905a5178b53e8/html5/thumbnails/5.jpg)
The basic Git workflow
• You modify files in your working directory.
• You stage the files, adding snapshots of them to your staging area.
• You do a commit, which takes the files as they are in the staging area and stores that snapshot permanently to your Git directory.
http://git-scm.com/book/en/Getting-Started-Git-Basics
![Page 6: Git for folk who like GUIs](https://reader034.vdocument.in/reader034/viewer/2022052619/5555a232b4c905a5178b53e8/html5/thumbnails/6.jpg)
Underpinnings
• Git = two 'tricks':
• Commit blob
• Move pointers (HEAD, branch)
• Theory video:Git For Ages 4 And Up
![Page 7: Git for folk who like GUIs](https://reader034.vdocument.in/reader034/viewer/2022052619/5555a232b4c905a5178b53e8/html5/thumbnails/7.jpg)
Committing
• "…a commit's ID is a SHA-1 hash of several pieces of information: the contents of the commit, and the IDs of its parent commits."
http://think-like-a-git.net/sections/graphs-and-git/garbage-collection.html
![Page 8: Git for folk who like GUIs](https://reader034.vdocument.in/reader034/viewer/2022052619/5555a232b4c905a5178b53e8/html5/thumbnails/8.jpg)
Branch and Merge• Testing Out Merges
• The Scout Pattern (merge on a new branch)
• The Save Point (merge on master)
• "Black Belt" (no branches)
http://think-like-a-git.net/sections/testing-out-merges.html
![Page 9: Git for folk who like GUIs](https://reader034.vdocument.in/reader034/viewer/2022052619/5555a232b4c905a5178b53e8/html5/thumbnails/9.jpg)
http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging
![Page 10: Git for folk who like GUIs](https://reader034.vdocument.in/reader034/viewer/2022052619/5555a232b4c905a5178b53e8/html5/thumbnails/10.jpg)
http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging
![Page 11: Git for folk who like GUIs](https://reader034.vdocument.in/reader034/viewer/2022052619/5555a232b4c905a5178b53e8/html5/thumbnails/11.jpg)
http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging
![Page 12: Git for folk who like GUIs](https://reader034.vdocument.in/reader034/viewer/2022052619/5555a232b4c905a5178b53e8/html5/thumbnails/12.jpg)
Terminology• Repository / Repo: the .git filesystem which contains the project history and
settings
• Staging area / index / cache: files (or 'hunks' of code) which will be committed
• Working Copy: the directory you're working in, may not be staged or committed yet
• Hash: A checksum which acts as a unique identifier for your commit. Also guarantees file integrity.
• Commit: create a snapshot or restore point, to which you can return in future (n: the snapshot itself)
• Checkout: sync your Working Copy with the selected commit
• Clone: to download a copy of a repository
• Branch: an active line of development
• Head: a reference to the branch you're working on
• Master: the default development branch
![Page 13: Git for folk who like GUIs](https://reader034.vdocument.in/reader034/viewer/2022052619/5555a232b4c905a5178b53e8/html5/thumbnails/13.jpg)
Terminology• Merge: to integrate changes from another branch into the
current
• Tag: a label which acts like a 'bookmark', generally used for tagging release versions.
• Rebase: funky merge.. think cherry picks & hard reset: Using 'git cherry-pick' to Simulate 'git rebase'
• Fork: to make modifications to someone else's project
• Push: send changes to a remote server
• Fetch: receive changes from a remote server
• Pull: Fetch & merge in one operation
http://www.kernel.org/pub/software/scm/git/docs/gitglossary.html#
![Page 14: Git for folk who like GUIs](https://reader034.vdocument.in/reader034/viewer/2022052619/5555a232b4c905a5178b53e8/html5/thumbnails/14.jpg)
Free Tools
• SourceTree by Atlassian
• GitHub for Mac
• 5 Windows Git Clients To ‘Git’ The Job Done
![Page 15: Git for folk who like GUIs](https://reader034.vdocument.in/reader034/viewer/2022052619/5555a232b4c905a5178b53e8/html5/thumbnails/15.jpg)
Free Services
• BitBucket (free / unlimited private repos for 5 users)
• GitHub (free public repos, $7/mo 5 private repos)
![Page 16: Git for folk who like GUIs](https://reader034.vdocument.in/reader034/viewer/2022052619/5555a232b4c905a5178b53e8/html5/thumbnails/16.jpg)
Wordpress & Git
• The WordPress core team uses SVN natively, but syncs to Git every 15 minutes, so folk who prefer Git can follow along:
https://github.com/WordPress/WordPress
![Page 17: Git for folk who like GUIs](https://reader034.vdocument.in/reader034/viewer/2022052619/5555a232b4c905a5178b53e8/html5/thumbnails/17.jpg)
Further Reading
• Think Like (a) Git: conversational clarity - the simplest read on understanding Git.
• Git Documentation: really clear, easy to read, the definitive resource. Free PDF
• CSStricks: Let’s Suck at GitHub Together
• CSStricks: Getting off FTP and onto Git Deployment with Beanstalk