Git for folk who like GUIs

2,923 views

Published on

Slides from a lightning talk at WordPress Melbourne User Group. The business end was a simple demonstration of SourceTree, no commandline :)

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,923
On SlideShare
0
From Embeds
0
Number of Embeds
1,308
Actions
Shares
0
Downloads
18
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Git for folk who like GUIs

  1. 1. Using GitAn intro for folk who like GUIs
  2. 2. 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
  3. 3. 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)
  4. 4. Setting Up• Create a repo from scratch or by cloning• Stage files / hunks• Commit to the repo
  5. 5. 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
  6. 6. Underpinnings• Git = two tricks: • Commit blob • Move pointers (HEAD, branch)• Theory video: Git For Ages 4 And Up
  7. 7. Committing• "…a commits 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
  8. 8. 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
  9. 9. http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging
  10. 10. http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging
  11. 11. http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging
  12. 12. 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 youre 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 youre working on• Master: the default development branch
  13. 13. 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 elses 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#
  14. 14. Free Tools• SourceTree by Atlassian• GitHub for Mac• 5 Windows Git Clients To ‘Git’ The Job Done
  15. 15. Free Services • BitBucket (free / unlimited private repos for 5 users) • GitHub (free public repos, $7/mo 5 private repos)
  16. 16. 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
  17. 17. 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
  18. 18. memeLab.com.au

×