Date post: | 18-Jul-2015 |
Category: |
Technology |
Upload: | robert-dumas |
View: | 1,006 times |
Download: | 3 times |
BACKUPS AREREALLY F**KINGIMPORTANT
photo credit: alexander muse (flic.kr/p/noL2K)
✓ what files have changed
✓ who made those changes
✓ when the changes were made
✓ how those changed files differ
✓ why they were changed (hopefully)
version control
✓ free & open source✓ local & distributed✓ fast & secure✓ stable & popular
what’s so great about git?
getting gitinstalling itbaked right in
textmatebundle
xcode
and more!
eclipseplugin
use homebrew mxcl.github.com/homebrew
use apt-get or yum
download itgit-scm.com/downloads
✓ free & open source
✓ local & distributed
✓ fast & secure
✓ stable & popular
what’s so great about git?
photo credit: muy yum (flic.kr/p/7ByV6Y)
stage
work area
git
cloning a repository$ git clone https://github.com/progit/progit.git
folder or URL
the location can be a folder or url
staging changes$ git add myfile.html$ git add css/*
you have to stage your changes each time you commit!
.gitignoresource/**.tempnuclear-‐launch-‐codes.txt
put files, folders and patterns in this file to tell git to ignore them.
branching
$ git branch child$ git checkout child
1. create child branch2. check out child branch3. work on new branch
merging
$ git checkout parent$ git merge child
1. check out parent branch
2. merge child branch into parent
tagging
$ git tag -‐a v1.0 -‐m "Product release"
$ git tag -‐a ronburgundy -‐m "Brick killed a guy with a trident."
master
development
v1.0
distributed gitshared
repositorydeveloper
developer
developer
$ git pull origin master$ git push origin master
rob dumaschicago public library@stray
thank you, code4lib!r2d.to/gitstart